A page can have only one server-side Form taghttp://forums.asp.net/t/870352.aspx/1?A+page+can+have+only+one+server+side+Form+tagThu, 01 Sep 2005 15:16:33 -0400870352871712http://forums.asp.net/p/870352/871712.aspx/1?A+page+can+have+only+one+server+side+Form+tagA page can have only one server-side Form tag <p>Problem:<br> I use a masterfile. The page account.aspx loads in contentplaceholder3. I have created a form in my account.aspx, but when I try to add a 'ASP:textbox' field to my contact.aspx , I get a: &quot;'TEXTBOX' must be placed inside a form tag with runat=server&quot; error. When I do this, I get a: &quot;A page can have only one server-side Form tag&quot; error. So I don't know what to do now!<br> thx</p> 2005-03-28T12:35:08-05:00871749http://forums.asp.net/p/870352/871749.aspx/1?Re+A+page+can+have+only+one+server+side+Form+tagRe: A page can have only one server-side Form tag <p><font face="Verdana" size="2">Hi Peter, </font></p> <p><font face="Verdana" size="2">What version of ASP.Net are you using?</font></p> 2005-03-28T13:04:43-05:00871770http://forums.asp.net/p/870352/871770.aspx/1?Re+A+page+can+have+only+one+server+side+Form+tagRe: A page can have only one server-side Form tag <font face="Arial">Microsoft .NET Framework Version:2.0.40607.42; ASP.NET Version:2.0.40607.42 </font> 2005-03-28T13:19:12-05:00872212http://forums.asp.net/p/870352/872212.aspx/1?Re+A+page+can+have+only+one+server+side+Form+tagRe: A page can have only one server-side Form tag The error, in this case, describes the problem pretty well. Your page, at run-time,&nbsp;can only have a single form with the runat=&quot;server&quot; attribute. I do believe that you can have other forms though, you would just have to use the&nbsp;older Request.Form method to get any field values from them. 2005-03-28T18:44:31-05:00872258http://forums.asp.net/p/870352/872258.aspx/1?Re+A+page+can+have+only+one+server+side+Form+tagRe: A page can have only one server-side Form tag <p>Hello.</p> <p>Could you show us the code you're using?</p> 2005-03-28T19:17:51-05:00872504http://forums.asp.net/p/870352/872504.aspx/1?Re+A+page+can+have+only+one+server+side+Form+tagRe: A page can have only one server-side Form tag <p>Do you get this error from the designer? And are you setting the masterPageFile via web.config? If so, then this is a designer issue, not an ASP.NET issue. Your page should run just fine. This complaint from VS.NET occurs since VS.NET is not reading web.config for the masterPageFile and then assumes you're not using a master page and then thinks you're missing the &lt;html&gt; tags. If this is actually your problem, then like I said, your page should actually execute alright and you can ignore the incorrect errors VS.NET is reporting.</p> <p>-Brock</p> 2005-03-28T22:41:04-05:00872772http://forums.asp.net/p/870352/872772.aspx/1?Re+A+page+can+have+only+one+server+side+Form+tagRe: A page can have only one server-side Form tag Ok, problem solved. The problem was that I have a masterpage file and a content file with a form. Even though I had commented the form tag in the masterpage file, this still got parsed in the code for some reason. Completely removing the tags from the masterpage did the trick and now my form in the content page works fine! 2005-03-29T05:41:48-05:00880084http://forums.asp.net/p/870352/880084.aspx/1?Re+A+page+can+have+only+one+server+side+Form+tagRe: A page can have only one server-side Form tag <p>This raises a good question about location. When building Master Pages is it best to leave the form tag on the Master Page on in the appropriate content section?</p> <p>Rick</p> 2005-04-04T04:03:01-04:00880151http://forums.asp.net/p/870352/880151.aspx/1?Re+A+page+can+have+only+one+server+side+Form+tagRe: A page can have only one server-side Form tag <p>In the MasterPage. Because you can't have more than one server side form tag. If you have the form tag in the MasterPage, you don't need to add it to each content page.</p> 2005-04-04T07:06:11-04:001006611http://forums.asp.net/p/870352/1006611.aspx/1?Re+A+page+can+have+only+one+server+side+Form+tagRe: A page can have only one server-side Form tag The problem is when the content page needs to perform a form based action and then the master page form tag conflicts with this. I noticed this currently in my site. I have a content page that is doing an action in its form tag. Because there is a form tag in the master page, it clobbers the content page's form tag from doing what it needs to do, move that page out of a master page scenario and it works. I tried removing the master page's form tag but that only caused menu controls to complain. Anyone figure out a reasonable solution to this?? 2005-08-01T20:56:24-04:001039288http://forums.asp.net/p/870352/1039288.aspx/1?Re+A+page+can+have+only+one+server+side+Form+tagRe: A page can have only one server-side Form tag Just a quick note: You can have multiple server side forms on a single asp.net page, but you have to make sure that only one form is VISIBLE at&nbsp;one time. You have to set visible=false property to all of your other forms on that page. <br> <br> <br> <br> - Naveed<br> <a href="http://www.vergecms.com">VergeCMS - The best Free Content Management System - http://www.vergecms.com</a> 2005-09-01T15:16:33-04:00