My website has two sections, admin and user.
In admin section I am using ckfinder which fills pages like 'home' and 'contact us' in the admin section.
The 'home' and 'contact us' page content is stored in a database.
In the user section I am just displaying these filled pages through database by their respective id in code behind.
All is working fine.
But problem is this:
In the 'contact us' page I need it that if the user fills contact us form and clicks on submit button then the message should be displayed showing that the record is filled.
The contactus form content is stored in database.
The content is like:
<label>Name:</label><input id="uname" name="uname" type="text" /><br />
<br />
<label>Phone:</label><input id="phone" name="phone" type="text" /><br />
<br />
<label>Email:</label><input id="email" name="email" type="text" /><br />
<br />
<label>Message:</label><textarea cols="40" id="msg" name="msg" rows="10"></textarea><br />
<br />
<label> </label><input type="submit" value="Submit" onserverclick="submit_onclick" runat="server" /><asp:Button
ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
This content is stored in database and displayed in user section.
The control and button displayed, but how can I call the click event which is in database?
In code behind of contact us form I used:
WebPageContent obj = new WebPageContent();
divContent.InnerHtml = obj.getContent(5);
the database access this id by page id field are below:
Page id PageName content