C#-Forms: A page can have only one server-side Form tag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ksm
    New Member
    • Feb 2008
    • 3

    C#-Forms: A page can have only one server-side Form tag

    Hi - I'm new to this forum...

    I wonder if someone can help me with the above error - when I try and run my
    webform with a masterpage and a form tag in it? Without having to set visible="false" ....

    Here's my form code:
    <form id="Form1" method="post" runat="server" visible="true" enctype="multip art/form-data" action="Default .aspx">

    Many Thanks.
    ksm.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    It is telling you that your page cannot contain more then one <form> element with the attribute runat="server"

    If you're just doing regular posting of forms, remove the runat="server" from the one that doesn't need it.

    Comment

    • ksm
      New Member
      • Feb 2008
      • 3

      #3
      Thanks...

      I'm only using the one form tag in my webform....

      Comment

      • ksm
        New Member
        • Feb 2008
        • 3

        #4
        At present it works fine - thank u again.

        ksm.

        Comment

        Working...