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

G

Guest

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
 
T

Tee

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 said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top