473,811 Members | 3,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Http Exception: A page can have only one
server-side Form tag.

your help is highly appreciated
Jan 4 '08 #1
4 4542
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.Http Exception: 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.co m>
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.co mwrote:
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.Http Exception: 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.co m>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.co m>
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.Http Exception: 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
2447
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 web part page? Does it take place at the page level? ...or the content area level? 3. Where is the Web Part Manager instantiated? ...in the Master Page? ....Content Page? ...elsewhere?
1
4862
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 can not get the default.aspx page to load. I can not even get a really simple aspx page to load. Default page: http://www.gallerox.com/default.aspx When I try to load the page I get the following warning:
1
1875
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 master page looks like this... <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
1
6547
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 noticed that I can't cache master pages. I can cache individual pages as before, however it appears that the server is building the master pages for "non cached" pages each time. (I have proved this by putting a date.time.now display on the...
0
1071
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 opened in design view. However, if the master page is not open in design view, then webforms opened in design view don't display correctly at all. Here are the specifics: My master page has the following lines of html: <head runat="server"...
9
2520
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 page in "Design", nor do I see it when I'm viewing the page in the browser. I'm adding the Master page through the Add New Item dialog, and creating Web Forms with the "Select Master Page" option checked, then selecting the Master page from the...
17
3167
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 pages? Kinda sorta a critical point no? Am I missing something? Rob. P.S. the day I find a book that actually is useful rather than just a
4
2376
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 there a way to import only one css for one children page? Thanks a lot.
6
9173
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" %> On the Master Page I have a public property exposed: Public Property ErrorMessage() As String Get Return txtError.InnerText End Get
6
1692
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 templates in that when the master page is updated, all the child pages created from the master page are updated and then they all need to be uploaded to the server? Or do you only have to upload the master page after an update?
0
10652
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10395
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10408
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10137
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9211
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7673
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4346
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3026
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.