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

Discussion in 'ASP .Net' started by =?Utf-8?B?UmF5IENhY2NpYXRvcmU=?=, Jul 16, 2004.

  1. My login.aspx page uses a MasterPage and is implemented as a Content page. However, I keep getting the error "A page can have only one server-side Form tag." when I run it. Yet there is not FORM tag in my Content page.

    One thing to note is that my login.aspx page was originally created in VS.NET 2003 and I'm now running it on VS.NET 2005 Beta, it was converted. All my other pages using the MasterPage work fine. I have a typical login page with two text boxes and a button.

    Help !!

    Ray
    =?Utf-8?B?UmF5IENhY2NpYXRvcmU=?=, Jul 16, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?UmF5IENhY2NpYXRvcmU=?=

    Tee Guest

    For page that uses MasterPage, itself must not content any server controls
    code like <form runat="server">, I think VS.NET 2005 Beta didn't help you
    remove those code after you change a page to uses MasterPage, so you need to
    manually edit the page source to look something like this.

    <%@ Page Language="VB" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="false" CompileWith="Default1.aspx.vb" title="Untitled Page"
    %>

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
    Runat="server">

    Whatever content for the page ...

    </asp:Content>



    I am not sure why you get the error message because I didn't see your
    source, but I guess you have a <form runat="server"> in your login.aspx,
    which is what you need to remove and only keep the code in between the
    <asp:content> & </asp:content>.


    HTH,
    Tee





    "Ray Cacciatore" <> wrote in message
    news:...
    > My login.aspx page uses a MasterPage and is implemented as a Content page.

    However, I keep getting the error "A page can have only one server-side Form
    tag." when I run it. Yet there is not FORM tag in my Content page.
    >
    > One thing to note is that my login.aspx page was originally created in

    VS.NET 2003 and I'm now running it on VS.NET 2005 Beta, it was converted.
    All my other pages using the MasterPage work fine. I have a typical login
    page with two text boxes and a button.
    >
    > Help !!
    >
    > Ray
    >
    Tee, Jul 16, 2004
    #2
    1. Advertising

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. Tom
    Replies:
    3
    Views:
    20,085
    Steve C. Orr [MVP, MCSD]
    Dec 2, 2003
  2. Tom
    Replies:
    8
    Views:
    941
    Eric Veltman
    Dec 11, 2003
  3. VB Programmer
    Replies:
    2
    Views:
    1,078
    VB Programmer
    Nov 4, 2004
  4. ScottF
    Replies:
    1
    Views:
    7,370
    Ken Cox [Microsoft MVP]
    Dec 2, 2004
  5. AlecL
    Replies:
    2
    Views:
    536
    AlecL
    Jan 2, 2007
Loading...

Share This Page