473,396 Members | 2,158 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,396 software developers and data experts.

multiple forms on one page

I have a simple web user control. I'd like for this form to appear twice
on a single aspx page. How do I get around the problem of having more
than one <form runat=server> tag?

More background: the user control is a login box. For design reasons I
want the box to be available in the header as well as the bottom of the
page.

Thanks,
Pint

Nov 19 '05 #1
3 3002
On Mon, 18 Jul 2005 20:22:37 -0500, Pint <pi******@fpoint.net> wrote:
I have a simple web user control. I'd like for this form to appear twice
on a single aspx page. How do I get around the problem of having more
than one <form runat=server> tag?

More background: the user control is a login box. For design reasons I
want the box to be available in the header as well as the bottom of the
page.

Thanks,
Pint


Don't define the form in your usercontrol; I assume that's what you're
doing. Usually you leave form definition to the page itself, for this
reason.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #2
Craig Deelsnyder wrote:
On Mon, 18 Jul 2005 20:22:37 -0500, Pint <pi******@fpoint.net> wrote:
I have a simple web user control. I'd like for this form to appear
twice on a single aspx page. How do I get around the problem of
having more than one <form runat=server> tag?

More background: the user control is a login box. For design reasons
I want the box to be available in the header as well as the bottom of
the page.

Thanks,
Pint


Don't define the form in your usercontrol; I assume that's what you're
doing. Usually you leave form definition to the page itself, for this
reason.


Thanks for your reply, but this did not address my question.

I understand that using a single form works. What I am trying to learn
is if anyone knows a way to allow for two or more forms on a single aspx
page. One use of this would be to allow a login form on every page, even
pages that have an entirely different form on them.
It would be nice to put the implementation of the login form in a user
control so that it could easily be incorporated into every page. Your
solution does not allow for this abstraction.
Thanks,
Pint
Nov 19 '05 #3
Hi,

You can have multiple runat=server forms in one aspx provided only one is
visible at a time, which thus is not useful for your problem.

I am still confused as to why you require to have form tags in your user
control. You could have the whole login logic in the user control and put
multiple instances of the user control in the same web form, right?

--
HTH,
Rakesh Rajan
MVP, MCSD
http://www.msmvps.com/rakeshrajan/

"Pint" wrote:
Craig Deelsnyder wrote:
On Mon, 18 Jul 2005 20:22:37 -0500, Pint <pi******@fpoint.net> wrote:
I have a simple web user control. I'd like for this form to appear
twice on a single aspx page. How do I get around the problem of
having more than one <form runat=server> tag?

More background: the user control is a login box. For design reasons
I want the box to be available in the header as well as the bottom of
the page.

Thanks,
Pint


Don't define the form in your usercontrol; I assume that's what you're
doing. Usually you leave form definition to the page itself, for this
reason.


Thanks for your reply, but this did not address my question.

I understand that using a single form works. What I am trying to learn
is if anyone knows a way to allow for two or more forms on a single aspx
page. One use of this would be to allow a login form on every page, even
pages that have an entirely different form on them.
It would be nice to put the implementation of the login form in a user
control so that it could easily be incorporated into every page. Your
solution does not allow for this abstraction.
Thanks,
Pint

Nov 19 '05 #4

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

Similar topics

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...
2
by: James X. Li | last post by:
Is there a way to implement multiple login forms for ASP.NET applications? With our application we want to implement simple login form for normal resources (downloadable files), but more rigorous...
8
by: TJS | last post by:
what are folks doing to get around limitation of one server form per page ?
7
by: Siv | last post by:
Hi, I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form...
5
by: Alex Maghen | last post by:
In ASPX 2.0 with MasterPages and all that, my entire page only has one actual <FORM>. But there are several different sections of the page that provide what are functionally separate forms with...
3
by: imrantbd | last post by:
I need array type name like "destList" must use for my destlist select box,not a single name.Or need a solution to capture multiple value of "destList" select box and send all selected value in php...
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
3
by: Yehia A.Salam | last post by:
hello, I have to deal with the weird limitation of asp.net, as I need to have multiple forms on my page, well three at least actually, one for the login, one for the search engine, and another...
1
by: draw | last post by:
I have one container page "container.htm" In this container I have multiple iframes "iframepage1.htm", "iframepage2.htm", etc. and one button firing a js script to submit. In every iframe page I...
2
by: =?Utf-8?B?VGFtbXkgTmVqYWRpYW4=?= | last post by:
Hi, I am going to write a large application using Visual Studio C#. I am going to use only one Form as main menu and go to other pages by cliking on next button in each page. I dont want to create...
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
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?
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:
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
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
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
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...

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.