Form Tags and Runat=Server

Discussion in 'ASP .Net Web Controls' started by dp_foster, Jul 14, 2004.

  1. dp_foster

    dp_foster Guest

    I am trying to have several forms on a page with each using textboxes, a button and the requiredfieldvalidator.

    I get the error A page can have only one server-side Form tag.

    The only way I see round it is using HTML controls and using Javascript instead of the requiredfieldvalidator.

    There has to be a better way?
     
    dp_foster, Jul 14, 2004
    #1
    1. Advertisements

  2. dp_foster

    Dale Guest

    I don't think the problem is the validator. Search your HTML and see if you
    have more than one <form> element. Where using multiple forms on a page was
    common pre-.NET, it is not allowed in ASP.NET.

    Dale

    "dp_foster" <> wrote in message
    news:...
    > I am trying to have several forms on a page with each using textboxes, a

    button and the requiredfieldvalidator.
    >
    > I get the error A page can have only one server-side Form tag.
    >
    > The only way I see round it is using HTML controls and using Javascript

    instead of the requiredfieldvalidator.
    >
    > There has to be a better way?
    >
    >
     
    Dale, Jul 15, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthew Louden
    Replies:
    4
    Views:
    13,742
    Teemu Keiski
    Nov 18, 2003
  2. ola

    Form tag with runat=server

    ola, Nov 28, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    12,099
    rakesh.mwisp
    Sep 8, 2008
  3. Tim Mulholland

    <div runat="server"> tags not working

    Tim Mulholland, Mar 4, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    3,831
    Tim Mulholland
    Mar 4, 2004
  4. =?Utf-8?B?dHJpbml0eXBldGU=?=

    must be placed inside a form tag with runat=server with inheritanc

    =?Utf-8?B?dHJpbml0eXBldGU=?=, Dec 21, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    8,019
    Steven Cheng[MSFT]
    Dec 22, 2004
  5. Tom wilson
    Replies:
    7
    Views:
    4,519
    William F. Robertson, Jr.
    Feb 10, 2005
  6. =?Utf-8?B?d3J5dGF0?=

    form in a form that runat server?

    =?Utf-8?B?d3J5dGF0?=, Jun 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    523
    Steve C. Orr [MVP, MCSD]
    Jun 7, 2005
  7. André
    Replies:
    2
    Views:
    1,112
    André
    Jun 23, 2008
  8. DC

    Add form runat=server tags in Composite Control

    DC, Dec 13, 2005, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    331
Loading...