A page can have only one server-side Form tag error
I've just created my own usercontrol (Contact form) and ran into this error. I've searched the forum and read the other posts on multiple form tags. My problem is that I can't find any other form tags in my templates.
You can test this easily, just request a page without the form-tag in you usercontrol (so the website will be shows, instead of the error), view the source and find '<form'
I dunno, but without the <form runat="server" /> tag you can't use any server-controls... So why would you want to comment out the form tag? The whole idea of ASP.NET web forms builds on this form tag.
And why do you want another form tag in you usercontrol?
I'd commented out the form tag previously as it was giving me an error on another page. It appears that ASP.NET was seeing the commented out section and was "thinking" there was a form there.
I've now removed the commented out code and placed another form tag on another template, which has fixed the issue.
A page can have only one server-side Form tag error
I've just created my own usercontrol (Contact form) and ran into this error. I've searched the forum and read the other posts on multiple form tags. My problem is that I can't find any other form tags in my templates.
You can test this easily, just request a page without the form-tag in you usercontrol (so the website will be shows, instead of the error), view the source and find '<form'
In my page source I have this:
<!-- <form method="post" action="/your-zone/application-form.aspx?" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">
and then a long list of the controls on my form and then a closing form tag. But its all commented out is this being added by the usercontrol itself ?
I dunno, but without the <form runat="server" /> tag you can't use any server-controls... So why would you want to comment out the form tag? The whole idea of ASP.NET web forms builds on this form tag.
And why do you want another form tag in you usercontrol?
I'd commented out the form tag previously as it was giving me an error on another page. It appears that ASP.NET was seeing the commented out section and was "thinking" there was a form there.
I've now removed the commented out code and placed another form tag on another template, which has fixed the issue.
Thanks for your help.
You can also comment it out the real way, with: <%-- <form bla bla> --%> ;-)
is working on a reply...