Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > A page can have only one server-side Form tag

Reply
Thread Tools

A page can have only one server-side Form tag

 
 
Tom
Guest
Posts: n/a
 
      11-27-2003
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


 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      11-27-2003
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" <(E-Mail Removed)> wrote in message
news:7d8d01c3b4a1$412f7770$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Tom
Guest
Posts: n/a
 
      12-02-2003
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?


 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      12-02-2003
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" <(E-Mail Removed)> wrote in message
news:0c9501c3b8f0$038add80$(E-Mail Removed)...
> 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?
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a new User Control gives page can have only one server-side Form tag AlecL ASP .Net 2 01-02-2007 02:46 PM
"A page can have only one server-side Form tag." when NONE exist! ScottF ASP .Net 1 12-02-2004 09:40 PM
Error: A page can have only one server-side Form tag. VB Programmer ASP .Net 2 11-04-2004 07:35 PM
A page can have only one server-side Form tag. =?Utf-8?B?UmF5IENhY2NpYXRvcmU=?= ASP .Net 1 07-16-2004 04:39 AM
A page can have only one server-side Form tag Tom ASP .Net 8 12-11-2003 07:51 AM



Advertisments