473,834 Members | 1,792 Online
Bytes | Software Development & Data Engineering Community
+ 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 3607
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
3150
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 like http://myserver/mypage.aspx. From there it gets blurry, because I just can't figure out how to do the rest. Does anybody have a sample page for me that I can take a look at? Just a simple one that takes whatever biztalk sends and saves it...
6
3570
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 error page. All six steps in the article work just fine. Then at the end of the article, there is a little comment about redirecting errors to an aspx page (instead of an html page):
0
1270
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 is: ASP.NET application is running on WEB server with application pool security account set to “Network Service”. This application accessing MS SQL 2000 server databases located on another server.
5
4965
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 requires access to LAN and internet. I installed the 20mb Framework, then drop my program on there, but theres no Framework Configuration for 2.0 only the 1.1 version (MSCORCFG.MSC) so I can't alter the security, and so my app fails to access the...
4
2520
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 wants to convert it to .NET2.0 what I don't want. How can I make Visual Studio open a .NET1.1 project for me in order to attach to a .NET2.0 process in which it runs to debug it? Or is there a better way to reach my goal: debugging a .NET1.1...
4
1873
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 stripped a page down to only output HTML4.01 and a single line of text with no formatting and it's still not viewable. Can anyone help me - i don't want to develop a asp.net2 mobile website - i want to develop a standard asp.net2 website that...
1
1323
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 this? Or any good website where I can learn this? I have no idea about how to make the asp.net page to talk with BizTalk. What kind of development tool I should use to create this page? What about "ASP.NET Web Application" from VB.NET? This is the...
0
1962
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" class="fancy" size="10" maxlength="10" readonly="readonly" name="date1" value="" id="txtDob"/> <input type="button" class="fancyButton" onclick="setDate('date1')" value="DOB" /> When i give the input type="text" a runat="server" tag, it gives an error...
0
1502
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 it by putting runnat="server" tag, it gives an error.....The line i have written is <input type="text" class="fancy" size="10" maxlength="10" readonly="readonly" name="date1" value="" id="txtDob" runat="server"/>
5
9873
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 dot.net on my new computer, but every time I try to access the ASPX pages locally (using http://localhost/main.aspx in the browser address bar), the browsers don't display the pages. Instead, a popup box asks if I want to open or save, and...
0
9649
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10515
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
10554
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
10224
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...
1
7761
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
5799
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4428
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
2
3985
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3084
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.