D
Divya
Hi
I am adding a user control to an aspx page dynamically. This user control has a link button. Hence I have to enclose it in a form tag with runat=server. When I execute the page, I get a javascript runtime error (; expected). The error occurs in the asp generated part of the code. The line where this error occurs is
else {theform = document._ctl0:form1;} in the following part of code
<html><head><meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"><meta name="CODE_LANGUAGE" Content="C#"><meta name="vs_defaultClientScript" content="JavaScript"><meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"><title>NMG Digital Marketing System</title><link href= ..\code\css\default.css rel='stylesheet' type='text/css'></head><body><table border="1" width="100%" height="100%"><tr><td align="center" height="20"><h3>NMG Digital Marketing System</h3></td></tr><tr><td align="center" valign="top"><form id="mainForm" runat="server" method=post><script language="javascript"
document.title = "Manage Admin"
parent.parent.parent.identifyFrame(this.name, document.title)
</script><form name="_ctl0:form1" method="post" action="index.aspx?c=admin.admincp.manageadmin" id="_ctl0_form1"><input type="hidden" name="__EVENTTARGET" value="" /><input type="hidden" name="__EVENTARGUMENT" value="" /><input type="hidden" name="__VIEWSTATE" value="dDwtOTU1NjcwNzcxO3Q8O2w8aTwxMD47PjtsPHQ8O2w8aTwwPjs+O2w8dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47PjtsPHQ8QDA8cDxwPGw8UGFnZUNvdW50O18hSXRlbUNvdW50O18hRGF0YVNvdXJjZUl0ZW1Db3VudDtEYXRhS2V5czs+O2w8aTwxPjtpPDE+O2k8MT47bDxpPDMxPjs+Oz4+Oz47Ozs7Ozs7Ozs7PjtsPGk8MD47PjtsPHQ8O2w8aTwxPjs+O2w8dDw7bDxpPDA+Oz47bDx0PHA8cDxsPFRleHQ7PjtsPDMxOz4+Oz47Oz47Pj47Pj47Pj47Pj47Pj47Pj47Pj47PkfgL7dJ8B16d6irfMFLe4UP0jBO" /><script language="javascript"><!-
function __doPostBack(eventTarget, eventArgument)
var theform
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1)
theform = document.forms["_ctl0:form1"]
else
theform = document._ctl0:form1
theform.__EVENTTARGET.value = eventTarget.split("$").join(":")
theform.__EVENTARGUMENT.value = eventArgument
theform.submit()
// --></script><table cellspacing="0" cellpadding="3" rules="all" border="1" id="_ctl0_dgUsers" style="height:136px;width:350px;border-collapse:collapse;"><tr><td style="font-weight:bold;">User Email Address</td><td> </td><td> </td></tr><tr><td></td><td style="width:30px;"><a href="javascript:__doPostBack('_ctl0$dgUsers$_ctl2$_ctl0','')">Edit</a></td><td style="width:30px;"><a href="javascript:__doPostBack('_ctl0$dgUsers$_ctl2$_ctl1','')">Delete</a></td></tr></table></form></form></td></tr><tr><td align="center" height="20"><i>Copyright 1998 - New Media Gateway, Inc.</i></td></tr></table></body></html
I am loading the static HTML part of the above page from a template file and I am dynamically loading the user control (manageadmin.ascx)
How do I solve this problem? Could someone please help
Thanks
-Divya
I am adding a user control to an aspx page dynamically. This user control has a link button. Hence I have to enclose it in a form tag with runat=server. When I execute the page, I get a javascript runtime error (; expected). The error occurs in the asp generated part of the code. The line where this error occurs is
else {theform = document._ctl0:form1;} in the following part of code
<html><head><meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"><meta name="CODE_LANGUAGE" Content="C#"><meta name="vs_defaultClientScript" content="JavaScript"><meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"><title>NMG Digital Marketing System</title><link href= ..\code\css\default.css rel='stylesheet' type='text/css'></head><body><table border="1" width="100%" height="100%"><tr><td align="center" height="20"><h3>NMG Digital Marketing System</h3></td></tr><tr><td align="center" valign="top"><form id="mainForm" runat="server" method=post><script language="javascript"
document.title = "Manage Admin"
parent.parent.parent.identifyFrame(this.name, document.title)
</script><form name="_ctl0:form1" method="post" action="index.aspx?c=admin.admincp.manageadmin" id="_ctl0_form1"><input type="hidden" name="__EVENTTARGET" value="" /><input type="hidden" name="__EVENTARGUMENT" value="" /><input type="hidden" name="__VIEWSTATE" value="dDwtOTU1NjcwNzcxO3Q8O2w8aTwxMD47PjtsPHQ8O2w8aTwwPjs+O2w8dDw7bDxpPDE+Oz47bDx0PDtsPGk8MT47PjtsPHQ8QDA8cDxwPGw8UGFnZUNvdW50O18hSXRlbUNvdW50O18hRGF0YVNvdXJjZUl0ZW1Db3VudDtEYXRhS2V5czs+O2w8aTwxPjtpPDE+O2k8MT47bDxpPDMxPjs+Oz4+Oz47Ozs7Ozs7Ozs7PjtsPGk8MD47PjtsPHQ8O2w8aTwxPjs+O2w8dDw7bDxpPDA+Oz47bDx0PHA8cDxsPFRleHQ7PjtsPDMxOz4+Oz47Oz47Pj47Pj47Pj47Pj47Pj47Pj47Pj47PkfgL7dJ8B16d6irfMFLe4UP0jBO" /><script language="javascript"><!-
function __doPostBack(eventTarget, eventArgument)
var theform
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1)
theform = document.forms["_ctl0:form1"]
else
theform = document._ctl0:form1
theform.__EVENTTARGET.value = eventTarget.split("$").join(":")
theform.__EVENTARGUMENT.value = eventArgument
theform.submit()
// --></script><table cellspacing="0" cellpadding="3" rules="all" border="1" id="_ctl0_dgUsers" style="height:136px;width:350px;border-collapse:collapse;"><tr><td style="font-weight:bold;">User Email Address</td><td> </td><td> </td></tr><tr><td></td><td style="width:30px;"><a href="javascript:__doPostBack('_ctl0$dgUsers$_ctl2$_ctl0','')">Edit</a></td><td style="width:30px;"><a href="javascript:__doPostBack('_ctl0$dgUsers$_ctl2$_ctl1','')">Delete</a></td></tr></table></form></form></td></tr><tr><td align="center" height="20"><i>Copyright 1998 - New Media Gateway, Inc.</i></td></tr></table></body></html
I am loading the static HTML part of the above page from a template file and I am dynamically loading the user control (manageadmin.ascx)
How do I solve this problem? Could someone please help
Thanks
-Divya