A
AlecL
I have a page that has about 5 or 6 user controls ranging from hearders
to footers to ad space but when I add a new user control which is a
form it gives me the exception "page can have only one server-side Form
tag" error. Here is the brief code that I am adding to the code:
on top:
<%@ Register TagPrefix="uc" TagName="CareerStats"
Src="/Controls/CareerStats.ascx" %>
and the div where I added the control:
<aspanel ID="pnlSecondaryNav" Runat="server">
<uc:SiteTools id="SiteTools" runat="server"></uc:SiteTools>
</aspanel>
The code inside the UC(if it is relevent) looks like this:
Sub btnSubmit_click()
Session.Item("txtTourName")=txtTournamentName.text
Session.Item("txtTourType")=txtTournamentType.selectedItem.text
Session.Item("txtTourYear")=txtYear.selectedItem.text
Response.redirect("/all_arnie/career.aspx")
End Sub
</script>
<tr>
<td class="topleft" valign="top">
<form runat="server">
<table id="CareerTable" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="PADDING-LEFT:5px; WIDTH:217px">
<h3>Career Stats</h3>
<label for="txtTournament">Tournament:</label><br>
<asp:textbox width="120px" id="txtTournamentName" runat="server"
/><br>
<label for="txtTournamentType">Select Tour Type:</label><br>
<asp:dropdownlist id="txtTournamentType" runat="server"
Width="128px">
<asp:listitem value="1">PGA</asp:listitem>
<asp:listitem value="2">Non-PGA</asp:listitem>
<asp:listitem value="3">Senior</asp:listitem>
<asp:listitem value="4">Non-Senior</asp:listitem>
</asp:dropdownlist><br>
<label for="txtTournament">Tournament Year:</label><br>
<asp:dropdownlist id="txtYear" runat="server" Width="152px">
<asp:listitem value="">Please Select</asp:listitem>
</asp:dropdownlist><br><br>
<br>
<asp:Button id="btnSubmit" runat="server" Text="Submit"></asp:Button>
<br>
<br>
</td>
</tr>
</table>
</form>
Please Help
to footers to ad space but when I add a new user control which is a
form it gives me the exception "page can have only one server-side Form
tag" error. Here is the brief code that I am adding to the code:
on top:
<%@ Register TagPrefix="uc" TagName="CareerStats"
Src="/Controls/CareerStats.ascx" %>
and the div where I added the control:
<aspanel ID="pnlSecondaryNav" Runat="server">
<uc:SiteTools id="SiteTools" runat="server"></uc:SiteTools>
</aspanel>
The code inside the UC(if it is relevent) looks like this:
Sub btnSubmit_click()
Session.Item("txtTourName")=txtTournamentName.text
Session.Item("txtTourType")=txtTournamentType.selectedItem.text
Session.Item("txtTourYear")=txtYear.selectedItem.text
Response.redirect("/all_arnie/career.aspx")
End Sub
</script>
<tr>
<td class="topleft" valign="top">
<form runat="server">
<table id="CareerTable" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="PADDING-LEFT:5px; WIDTH:217px">
<h3>Career Stats</h3>
<label for="txtTournament">Tournament:</label><br>
<asp:textbox width="120px" id="txtTournamentName" runat="server"
/><br>
<label for="txtTournamentType">Select Tour Type:</label><br>
<asp:dropdownlist id="txtTournamentType" runat="server"
Width="128px">
<asp:listitem value="1">PGA</asp:listitem>
<asp:listitem value="2">Non-PGA</asp:listitem>
<asp:listitem value="3">Senior</asp:listitem>
<asp:listitem value="4">Non-Senior</asp:listitem>
</asp:dropdownlist><br>
<label for="txtTournament">Tournament Year:</label><br>
<asp:dropdownlist id="txtYear" runat="server" Width="152px">
<asp:listitem value="">Please Select</asp:listitem>
</asp:dropdownlist><br><br>
<br>
<asp:Button id="btnSubmit" runat="server" Text="Submit"></asp:Button>
<br>
<br>
</td>
</tr>
</table>
</form>
Please Help