Hi all,
I am a beginner in DNN.I have basic asp.net knowledge.In asp.net i know how to create,call,edit sql stored procedures programmatically .But it seem like in here the way DNN call the procedures and placement for the .cs file are different.Hence can anyone provide me so guide and useful links that i can refer on so that I can get a good start on DNN.
My simple question is this:-
Below is the UI that give me label,textbox,button.The things that I want to know is when I clicked Save button the content will save into sql database.
<
asp:Label
ID
=
"lblcontent"
runat
=
"server"
Text
=
"Content"
/>
<
asp:Textbox
ID
=
"txtcontent"
runat
=
"server"
/>
<
asp:Button
ID
=
"btnsave"
runat
=
"server"
Text
=
"Save"
/>
Below is the create table created to run in development interface.
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'{databaseOwner}[{objectQualifier}save_item]') AND type in (N'U'))
DROP TABLE {databaseOwner}[{objectQualifier}save_item]
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'{databaseOwner}[{objectQualifier}save_item]') and OBJECTPROPERTY(id, N'IsTable') = 1)
BEGIN
CREATE TABLE {databaseOwner}[{objectQualifier}save_item](
[content_id] [int] NOT NULL IDENTITY (1, 1),
[content_desc] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_{objectQualifier}save_item] PRIMARY KEY CLUSTERED
(
[content_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
)
END
GO
Below is the stored procedure created to save item into table.
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'{databaseOwner}[{objectQualifier}add_content]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE {databaseOwner}[{objectQualifier}add_content]
GO
CREATE PROCEDURE {databaseOwner}[{objectQualifier}add_content]
@contentid int,
@contentdesc nvarchar(MAX)
AS
Insert into {databaseOwner}[{objectQualifier}save_item]
(
content_id,
content_desc
)
values
(
@contentid,
@content_desc
)
GO
From here I hopping for people to guide me on how to proceed with linking to sql in the DNN(BL,DAL,UI).
Any helps are much appreciated .Thanks in advance!
Regards,