Geekpedia Tutorials Home

Building a C# Chat Client and Server

Building a C# Chat Client and ServerA step by step tutorial teaching you how to create your own chat client and chat server easily in C#, for local networks or the Internet.

in C# Programming Tutorials

Getting Hard Drive Information

Getting Hard Drive InformationA C# tutorial showing you how to make use of WMI to extract information on disk drives, such as model, capacity, sectors and serial number.

in C# Programming Tutorials

UPS Shipping Calculator

UPS Shipping CalculatorThis tutorial will teach you how to calculate the shipping cost based on the weight, height, length and depth of the box, the distance and the UPS service type.

in PHP Programming Tutorials

Create Your Own Rich Text Editor

Create Your Own Rich Text EditorCreating a Rich Text Editor using JavaScript is easier to do than you might think, thanks to the support of modern browsers; this tutorial will walk you through it.

in JavaScript Programming Tutorials
Search
Tutorials
Programming Tutorials
IT Jobs
From CareerBuilder

A page can have only one server-side Form tag

On Thursday, October 6th 2005 at 10:59 AM
By Andrew Pociu (View Profile)
****-   (Rated 3.6 with 13 votes)
Advertisement
More ASP.NET Resources
In ASP.NET 1.1, only one server-side form tag is allowed on a page. This error occurs if you have two or more server-side form tags on your page.
A server-side form tag is the tag which has a runat="server" attribute. If this attribute is missing, then it's a typical HTML form tag. The conclusion is that you are allowed to use multiple form tags on a page, as long as only one has the runat="server" attribute. The disadvantage of the form that doesn't have this attribute, is that view state won't work (meaning form values will disappear when using the back/forward browser buttons). It's a small price to pay if you really need multiple forms on a page.
Digg Digg It!     Del.icio.us Del.icio.us     Reddit Reddit     StumbleUpon StumbleIt     Newsvine Newsvine     Furl Furl     BlinkList BlinkList

Rate Rate this Knowledge Base article
Comment Current Comments
by bareAre on Monday, April 10th 2006 at 03:12 AM

But the largest disadvantage isn´t mentioned. You can´t use Asp controls or onClick event from VS. Very strange..

by Thomas Boring on Tuesday, May 2nd 2006 at 06:46 PM

I just ran in to this for the first time today, using VS.NET 2005 & .NET 2.0. This is lame! As long as I give each of my server-side forms a unique ID, the framework shouldn't care how many server-side forms I have.

by jeff newtovbandthisi on Wednesday, July 5th 2006 at 10:43 PM

uh..yea..so like my last name says, i'm brand to vb and this seems like a no-brainer functionality the fellas in redmond should've thought about

where's mencia when i need him .... da di daaaaaaaa!

by on Monday, October 2nd 2006 at 03:16 AM

d

by Amy on Friday, February 23rd 2007 at 05:47 AM

It solved my problem just in flick. thank you for this...

by laxmi r on Thursday, May 3rd 2007 at 06:02 AM

It is not resolved my problem

by iggy on Friday, June 1st 2007 at 02:22 PM

Indeed ridiculous but it solved my problem, thanks!

by arun on Tuesday, January 29th 2008 at 01:21 AM

Server Error in \'/ss2\' Application.
--------------------------------------------------------------------------------

A page can have only one server-side Form tag.

by on Tuesday, January 29th 2008 at 01:23 AM

please help me out . i have following error in my project
Server Error in '/ss2' Application.
--------------------------------------------------------------------------------Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: A page can have only one server-side Form tag.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): A page can have only one server-side Form tag.]
System.Web.UI.Page.OnFormRender(HtmlTextWriter writer, String formUniqueID)
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Page.ProcessRequestMain()




A page can have only one server-side Form tag.

by Rayan on Tuesday, April 22nd 2008 at 06:44 AM

Hi,

Iam using a function to export a GridView content to an Excel Sheet. but iam getting this error:

\"A page can have only one server-side Form tag.\"

any solution please???

Thanks,

Rayan

by Pablo on Wednesday, October 1st 2008 at 05:12 PM

A small price to pay? this is BULLSHIT!!! I CANT HAVE 2 FORMS ON ONE PAGE!?!?!?!?! WHAT THE FUCK???

by jaka on Monday, November 17th 2008 at 09:11 AM

Yeah, this is real bullshit!! What the fuck!?

by jaka on Monday, November 17th 2008 at 09:11 AM

Yeah, this is real bullshit!! What the fuck!?

by jamid on Thursday, December 25th 2008 at 10:02 PM

i have the same problem
i have only one <form runat="server"
i checked in view html source ...

by jamid on Thursday, December 25th 2008 at 10:10 PM

sure he was right!
i had two (even it is set to visible=false and method=get
....

by mark N on Tuesday, December 30th 2008 at 01:25 AM

Agree. No reason why there should be such a restriction.
I have a search form in my master and need separate controls in my content forms. I definately have a need but MS seems to block this functionality without logical reason.
Sad....

by Bryan on Wednesday, March 11th 2009 at 04:46 PM

I agree that this is a problem which could have been handled better in the Framework. However There is a much better solution then that proposed. The solution is to merge the forms into one giant form and then make sure you have button handlers which address only the part of the now merged form you want to use. This adds some complexity especially when it comes to form validation but there are methods to get this to work.

by PRASHAN on Wednesday, May 20th 2009 at 10:32 AM

yo then wat the fuck is the solution for this problem. common geeks ull suppose to give solution's.

by jeff on Saturday, September 5th 2009 at 04:15 PM

how on earth do i get a one form to collect information from a sqldatasource and asp controls, and have another form post to a mail script to send the user information regarding the info i pulled. Iv tried everything and cant get it to work, only one server side form tag, does anyone have any ideas?

by Ranjith on Sunday, November 29th 2009 at 12:27 PM

Ye man this is really a bullshit. It gives a lot prob while integrating paypal and other services :(
Bullshit MS

by Ranjith on Sunday, November 29th 2009 at 12:28 PM

Ye man this is really a bullshit. It gives a lot prob while integrating paypal and other services :(
Bullshit MS

by ElectricNinja on Tuesday, April 20th 2010 at 09:52 AM

lol yeah this is some bullshit

by dotnetJack on Tuesday, September 21st 2010 at 12:28 PM

LOL.

I found two form tags inside my Master page , i deleted one and it works .

by Talley on Wednesday, October 13th 2010 at 04:48 PM

The problem occurs usually when you are importing a master file into a new page.
Just delete form tag on the master file bc you do not need it there.

by Rach on Wednesday, October 20th 2010 at 07:41 AM

I just deleted the form tag from my Master page too and it worked fine after that!! Thanks!

by Hanisha on Friday, November 5th 2010 at 01:03 PM

Hi,
m also getin the same problem ,even
m nt using any master page n the page has only 1 form tag wid runat="server".
Page is in a folder with in aplication
Plz give me some solution.

by Rafael on Wednesday, November 10th 2010 at 03:08 PM

Look all you need to do is remove all form tags except the one in the Master Page.

Make sure you place the Form tag in the Master page right after the Body tag.

like so: <body><form id="" runat="server>
"Everything else in between"
</form></body>

by ASPSucks on Saturday, January 15th 2011 at 02:51 AM

ASP.Net Sucks.....


I was happy with my PHP Projects....

by Thomas on Sunday, March 13th 2011 at 03:37 PM

Exactly what the last person said ASP.Net sucks, PHP is much easier to use. go get a book on PHP its BETTER

by kk on Tuesday, August 2nd 2011 at 12:59 PM

Server Error in '/PaypalCSharporigi' Application.
A page can have only one server-side Form tag.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: A page can have only one server-side Form tag.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): A page can have only one server-side Form tag.]
System.Web.UI.Page.OnFormRender() 8905736
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) 36
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) 31
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) 53
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 100
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) 40
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 208
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) 8
System.Web.UI.Control.Render(HtmlTextWriter writer) 10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 208
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) 173
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) 31
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) 53
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 100
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) 40
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 208
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) 8
System.Web.UI.Control.Render(HtmlTextWriter writer) 10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 208
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) 8
System.Web.UI.Page.Render(HtmlTextWriter writer) 29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 3060


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

help please....
i haven't used runat="server" twice in any form

by apply for credit card on Sunday, December 18th 2011 at 12:31 PM

i liked it too much . better if u provide a program and give comments on it .such as a bank account program. Why don't you post your own solution Pavlo..... it would have sure taken less time than writing all that.

by Mani on Thursday, July 18th 2013 at 05:45 PM

I am also getting this error:
Can someone please help. I am redirecting from page 1 to an aspx page(page 2), filling info on the screen by setting session variables and saving this page(page 2) as HTML using htmlTextWriter and going back to the original page 1.

This is working on my localhost but not on the server.

Server Error in '/webapps' Application.

A page can have only one server-side Form tag.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: A page can have only one server-side Form tag.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): A page can have only one server-side Form tag.]
System.Web.UI.Page.OnFormRender() 8975032
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) 36
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) 31
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) 53
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 100
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) 40
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) 208
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) 8
ac3Print.Render(HtmlTextWriter writer) 115
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) 27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) 100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) 25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 3060


Comment Comment on this Knowledge Base article
Name: Email:
Message:
Knowledge Base Related Knowledge Base Articles
There are no related KB articles.

Comment Related Source Code
There is no related code.

Comment Related Tutorials
There are no related tutorials.

Jobs ASP.NET Job Search
My skills include:

Enter a City:

Select a State:


Advanced Search >>
Ads

From the creators of Geekpedia, a revolutionary new coupon website!

BargainEZ has coupons codes, printable coupons, bargains and it is the leading source of Passbook coupons for iPhone and iPod touch devices.

Coupons
Discover Geekpedia
Other Resources