470,593 Members | 2,397 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,593 developers. It's quick & easy.

A page can have only one server-side Form tag

Tom
Hi,

I have a web page which has server side include for top,
left, main and bottom.aspx pages.

In the left.aspx, there is a login web control which has a
pair of form tags.

In the main page, there is a registration form which has a
pair of form tags.

So, there are 2 pairs of form tags in one index.aspx page.

I cannot run it and it prompted the error of "A page can
have only one server-side Form tag".

I removed the </form> for left.aspx and <form> for
main.aspx. It cannot run also as it said the respective
form tag was missed.

So, how can I handle a web form which has 2 forms?

Thanks

Tom
Nov 18 '05 #1
3 18931
The most common replacement for old fashioned include files are web user
controls.
They basically are like object oriented include files on steroids.
They'll solve your form problem along with a bunch of other problems you
never knew you had.

Here's more info:
http://msdn.microsoft.com/library/de...ercontrols.asp
http://msdn.microsoft.com/library/de...ercontrols.asp
http://msdn.microsoft.com/library/de...ebControls.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Tom" <ke*****@yahoo.com> wrote in message
news:7d****************************@phx.gbl...
Hi,

I have a web page which has server side include for top,
left, main and bottom.aspx pages.

In the left.aspx, there is a login web control which has a
pair of form tags.

In the main page, there is a registration form which has a
pair of form tags.

So, there are 2 pairs of form tags in one index.aspx page.

I cannot run it and it prompted the error of "A page can
have only one server-side Form tag".

I removed the </form> for left.aspx and <form> for
main.aspx. It cannot run also as it said the respective
form tag was missed.

So, how can I handle a web form which has 2 forms?

Thanks

Tom

Nov 18 '05 #2
Tom
I read the web user control online tutorial. it said there
are no html, form tags in ascx files.

so, i removed all the form tags insides the left and main
ascx files. but, the error said textbox must need form
tags.

how can i fix this problem?
Nov 18 '05 #3
You must have exactly one server form tag (and of course the matching
closing tag.)
Your user controls should exist within this form. In other words your
control's declaration tag should be between the opening and closing form
tags.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Tom" <ke*****@yahoo.com> wrote in message
news:0c****************************@phx.gbl...
I read the web user control online tutorial. it said there
are no html, form tags in ascx files.

so, i removed all the form tags insides the left and main
ascx files. but, the error said textbox must need form
tags.

how can i fix this problem?

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Paul Robinson | last post: by
13 posts views Thread by teenzbutler | last post: by
6 posts views Thread by John Lau | last post: by
reply views Thread by Goober at christianDOTnet | last post: by
11 posts views Thread by Jeff | last post: by
82 posts views Thread by Eric Lindsay | last post: by
8 posts views Thread by sgottenyc | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.