Adding ASP.Net Controls to Pages

grbiniek's Avatar

grbiniek

31 Aug, 2010 08:51 PM

I'm trying to add ASP.Net controls to pages. I try to create a new template called CodeTest_Template and I add the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<h2>Dynamic Data Loader</h2>
<asp:DropDownList ID="ddlTest" runat="server">
</asp:DropDownList>
<!--#START-CODE
'here I will dynamically populate the above dropdown list when the page loads
#END-CODE-->
<system-region name="DEFAULT"/>
</form>
</body>
</html>

However once I click 'submit' the asp:DropDownList element is removed. I am extremely new to Cascade Server so any pointers would be greatly appreciated.

Thanks!

  1. 1 Posted by david.klanac on 02 Sep, 2010 02:09 PM

    david.klanac's Avatar

    Hi Greg,

    You just need to specify an XML namespace so that the XML parser will allow your "asp" prefix to be used.

    If you modify the <html> element like this, your .net control will be preserved:

    Original:
    <html xmlns="http://www.w3.org/1999/xhtml">

    Modified with asp namespace:
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:asp="http://www.asp.net">

  2. Tim closed this discussion on 24 Sep, 2010 03:23 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM