473,412 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

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

I am converting all my asp.net pages to asp.net 2.0 for supporting
master pages.

I get the following error in runtime.

A page can have only one server-side Form tag.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: A page can have only one
server-side Form tag.

your help is highly appreciated
Jan 4 '08 #1
4 4507
Karthik <ka******@gmail.comwrote:
I am converting all my asp.net pages to asp.net 2.0 for supporting
master pages.

I get the following error in runtime.

A page can have only one server-side Form tag.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: A page can have only one
server-side Form tag.

your help is highly appreciated
And how many forms do your pages actually have? Do you by any chance
have one on the master page and one in the actual pages?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Jan 4 '08 #2
On Jan 4, 11:26*am, Jon Skeet [C# MVP] <sk...@pobox.comwrote:
Karthik <karth...@gmail.comwrote:
I am converting all my asp.net pages to asp.net 2.0 for supporting
master pages.
I get the following error in runtime.
A page can have only one server-side Form tag.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A page can have only one
server-side Form tag.
your help is highly appreciated

And how many forms do your pages actually have? Do you by any chance
have one on the master page and one in the actual pages?

--
Jon Skeet - <sk...@pobox.com>http://www.pobox.com/~skeet* Blog:http://www.msmvps.com/jon.skeet
World class .NET training in the UK:http://iterativetraining.co.uk
Hi jon,

Thanks for your response.

I have two pages, one master page and another page which uses the
master page.
i have <form runat = "server"tag in my derived page. because of this
i got this error.
i tried removing the form tag, but it didn't work. it gives the same
error.
Is there any other way to convert these pages.
Jan 4 '08 #3
Karthik <ka******@gmail.comwrote:

<snip>
I have two pages, one master page and another page which uses the
master page.
i have <form runat = "server"tag in my derived page. because of this
i got this error.
i tried removing the form tag, but it didn't work. it gives the same
error.
Is there any other way to convert these pages.
Please post a sample master page, and a sample content page, as simple
as possible, that still gives you the error.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Jan 4 '08 #4
Karthik,
You cannot have a form with runat=server in a Page that uses a MasterPage.
You should only have asp:Content placeholders. No HTML, no BODY, etc.

Also, not to sound like a broken MP3 but this is really an ASP.NET group
question, not a C# language group one.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"Karthik" wrote:
I am converting all my asp.net pages to asp.net 2.0 for supporting
master pages.

I get the following error in runtime.

A page can have only one server-side Form tag.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: A page can have only one
server-side Form tag.

your help is highly appreciated
Jan 4 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
1
by: Carl Gilbert | last post by:
Hi I am trying to get a site working with some 1&1 web space. I have the MS Business Pro account which has ASP.NET Support and SQL Server. I am trying to get an online gallery to work but I...
1
by: Alan Silver | last post by:
Hello, I am just experimenting with master pages, and am trying to add a content placeholder in the <head> section, so that individual pages can set their own page title and meta tags. The...
1
by: Fred Nelson | last post by:
I have a question regarding page caching in a C# Web App that I'm developing. I have used page caching successfully in VS2003 at the page level - and it also works the same in VS2005. I have...
0
by: Nick Stansbury | last post by:
I'm experiencing a weird problem with master pages in VS 2005 - in short when the master page is open in design view in visual studio all other webforms that use that master display correctly when...
9
by: Andrew Kidd | last post by:
Hi, I've just been working through several examples of how to create Master pages and then create content pages which are linked, but I cannot see the Master page when I'm viewing the content...
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
4
by: Mikaël PLOUHINEC | last post by:
Hello, I have created a master page with a css. How can I use css in the children pages? The css must be declared in the <head</headsection. Does I have to import all my css in my master? Is...
6
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
I am trying to access a Public property on a Master Page from a Base Page. On the content pages I have the MasterType Directive set up as follows: <%@ MasterType virtualpath="~/Master.master" %>...
6
by: Mickey | last post by:
Coming from a Dreamweaver/ASP/PHP background. Planning to use Visual Studio 2008 for a website. Complete newbie question here (please be gentle!): Do master pages work similar to Dreamweaver...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.