tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/140-adding-aspnet-controls-to-pagesCascade CMS: Discussion 2018-10-18T20:36:02Ztag:help-archives.hannonhill.com,2010-02-09:Comment/27667982010-08-31T20:51:23Z2011-02-04T19:45:29ZAdding ASP.Net Controls to Pages<div><p>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:</p>
<pre>
<code><!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></code>
</pre>
<p>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.</p>
<p>Thanks!</p></div>grbiniektag:help-archives.hannonhill.com,2010-02-09:Comment/27667982010-09-02T14:09:47Z2010-09-02T14:09:47ZAdding ASP.Net Controls to Pages<div><p>Hi Greg,</p>
<p>You just need to specify an XML namespace so that the XML parser will allow your "asp" prefix to be used.</p>
<p>If you modify the <code><html></code> element like this, your .net control will be preserved:</p>
<p>Original:<br />
<code><html xmlns="http://www.w3.org/1999/xhtml"></code></p>
<p>Modified with asp namespace:<br />
<code><html xmlns="http://www.w3.org/1999/xhtml" xmlns:asp="http://www.asp.net"></code></p></div>david.klanac