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.

 
 
=?Utf-8?B?UmF5IENhY2NpYXRvcmU=?=
Guest
Posts: n/a
 
      07-16-2004
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

 
Reply With Quote
 
 
 
 
Tee
Guest
Posts: n/a
 
      07-16-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
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 Tom ASP .Net 8 12-11-2003 07:51 AM
A page can have only one server-side Form tag Tom ASP .Net 3 12-02-2003 10:43 PM



Advertisments