473,386 Members | 1,795 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,386 software developers and data experts.

Multiple ASP.NET Forms within the same page

Hello,

I am converting an old ASP website to ASP.Net and I am running into a
problem.

I have created a header control that I am loading on every page. This
control is gathering some information and displaying it on the screen.
There is also a drop down that is populated if they have access to more than
one profile and they can switch between them.

The problem is, that when I add the control to a new page, that I need to do
some sort of form submission on, it is not possible. It tells me that "A
page can have only one server-side Form tag".

Any help would be greatly appreciated.

Thanks in advance,

Jason

Nov 19 '05 #1
2 1171
Why not just place a single server side form?

<form id="form1" runat="server">
<uc1:header id="header" runat="server" />
Welcome
</form>

there's no reason for your header user control to have a form tag, simply
have a button in there and handle it's onClick event.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Jason" <jr***@modernfold.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I am converting an old ASP website to ASP.Net and I am running into a
problem.

I have created a header control that I am loading on every page. This
control is gathering some information and displaying it on the screen.
There is also a drop down that is populated if they have access to more
than one profile and they can switch between them.

The problem is, that when I add the control to a new page, that I need to
do some sort of form submission on, it is not possible. It tells me that
"A page can have only one server-side Form tag".

Any help would be greatly appreciated.

Thanks in advance,

Jason

Nov 19 '05 #2
The header control should not contain a form. It should be placed in your
WebForm, just as all the other controls in your page, and should
interoperate with it, just as all the other controls in your page.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Big things are made up of
lots of little things.

"Jason" <jr***@modernfold.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I am converting an old ASP website to ASP.Net and I am running into a
problem.

I have created a header control that I am loading on every page. This
control is gathering some information and displaying it on the screen.
There is also a drop down that is populated if they have access to more
than one profile and they can switch between them.

The problem is, that when I add the control to a new page, that I need to
do some sort of form submission on, it is not possible. It tells me that
"A page can have only one server-side Form tag".

Any help would be greatly appreciated.

Thanks in advance,

Jason

Nov 19 '05 #3

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

Similar topics

1
by: Vanessa | last post by:
Hi all ! I am looking for a php class and page layout framework allowing smooth object oriented insertion of several, possibly different, forms within the same page layout. All of that while...
0
by: Tess | last post by:
Hi, Long time reader, first time poster... Any help is appreciated. I have a few questions regarding Winform controls embedded within an html page. For more info please see the appendix. Now,...
2
by: clintonG | last post by:
I understand ASP.NET 1.1 will only support a single server-side form in an ..aspx page. Could I get tricky from that same page and have a second server-side form in an .aspx page displayed within...
0
by: jon | last post by:
Using Visual C++ and MFC, one could generate a very nice MMI using CFormView and the method detailed in the MSDN "vswap" example to allow multiple forms to be viewed ( switched to ) within a single...
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
2
by: MORALBAROMETER | last post by:
Hallo, I want to write a programming with c#.Net having forms like MS Word. The main form A contain commonly used objects.I have many other forms (B,C,D) etc that have inherited from A. i realised...
2
by: Darren Carter | last post by:
Hi, I have mutliple asp:Panel controls on a single page, each with a default button defined (each default button resides within its respective asp:Panel). All validation controls and buttons...
5
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.