473,473 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

C# ASPX .NET2: A page can have only one server-side Form tag.

7 New Member
I have searched everywhere and found a lot of information on this but nothing that can fix my problem.

This is my shopping cart HTML, I eventually realised I dont need a form tag here because I have one over my entire masterpage. However when I click on the first button "Update" it works fine. But when I try to redirect from this page with "Proceed To Checkout", which Posts Back to another page I get the error.

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

I don't have any form tags on either of these pages I have double checked.

Expand|Select|Wrap|Line Numbers
  1. <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
  2.     <div id="content-a">
  3.             <h1>
  4.                 Your Shopping Cart</h1>
  5.             <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
  6.             <asp:Table ID="cart" runat="server" Height="55px" Width="543px">
  7.             </asp:Table>
  8.             &nbsp;
  9.             <p style="text-align: right">
  10.                 &nbsp; &nbsp;&nbsp;
  11.                 <asp:Button ID="btnUpdate" runat="server" Text="Update"  />
  12.                 <!--  <input id="btnUpdate"type="submit" value="Update"  />  -->
  13.                 &nbsp; &nbsp; &nbsp;
  14.             </p>
  15.  
  16.             <asp:Label ID="lbTotalHd" runat="server" Font-Bold="True" Text="Total:"></asp:Label>
  17.             <asp:TextBox ID="tbTotal" runat="server" BackColor="Transparent" BorderStyle="None"></asp:TextBox>
  18.             <asp:Button ID="btnProceed2" runat="server" Text="Proceed To Checkout" PostBackUrl="ProcessCard.aspx" />
  19.             <!--  <input id="btnProceed" runat="server" type="submit" value="Proceed" />  -->
  20.     </div>
  21. </asp:Content>
Oct 20 '07 #1
1 3592
Munawar
12 New Member
Hi,
Your master page has only one form tag and the content page has no form tag, Thats fine but the page you are redirecting to(checkout page) seems having more than one form tag.
Kindly double check the page you are redirecting to for form tags.

Even if you have more than one Form tag on an ASP.Net page it should work
<form id="form1">
<form id="form2">

but it would not work if the tags are with property "runat" set to server, as follows:
<form id="form1" runat ="server">
<form id="form2" runat ="server">

Hope it would help you.
Thanks
Oct 21 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Daniel Rimmelzwaan | last post by:
I want to send a biztalk document to an aspx page, and I need to see some sample code, because I just can't make it work. I have a port with transport type HTTP, pointing to my aspx page, something...
6
by: John Lau | last post by:
Hi, I am looking at the MS KB Article 306355: HOW TO: Create Custom Error Reporting Pages in ASP.NET by Using Visual C# .NET This article describes how to redirect errors to a custom html...
0
by: Roman Troshkov | last post by:
Hello, I Hope to see any opinions on this problem: After installing Net framework 2 on one of our Win2003 Web server I have experiencing trouble accessing MS SQL 2000 database. Configuration...
5
by: Scott H | last post by:
I spent most of yesterday looking into this, and still didn't really find an answer... I have a .NET2.0 app that I need to install on a server, and then possibly several other servers later, it...
4
by: hvj | last post by:
I need to run a .NET1.1 program in a .NET2.0 CLR. The .NET1.1 exe starts correctly in .NET2.0. Now I want to debug in Visual Studio 2005. But when I try to open the .NET1.1 project, Visual Studio...
4
by: InnoCreate | last post by:
Hi everyone, I've developed a couple of asp.net1.1 websites and these are viewable using my mobile phone. I've now moved over to asp.net2 and i'm unable to view asp.net2 websites on my phone. I've...
1
by: Siva | last post by:
I am new to ASP.NET. I want to publish a page on IIS. That page will accept the request pages from users and hand in that request to BizTalk 2004 receive port. Does anyone know how can I do...
0
by: kmithu | last post by:
Hey friends, I am making a calender control using javascript but I am not able to retrieve its value on my .aspx.cs coding page in asp.net2.0. My text box code is : <input type="text"...
0
by: kmithu | last post by:
hi I am writing the code for calender control for using it in Asp.net2.0 and i want to retrieve the value from that box onto my coding page. Please guide me how to do this because when i try using...
5
by: Arch Stanton | last post by:
I have a set of ASPX pages that work fine on my home computer (Vista), and on a server at work (XP). I just got a new laptop at work (XP) and these same files don't work on it. I installed IIS and...
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
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...
1
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...
0
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.