473,695 Members | 2,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3042
On Mon, 18 Jul 2005 20:22:37 -0500, Pint <pi******@fpoin t.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******@fpoin t.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******@fpoin t.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
539
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 surfin it in multiple browsers simultaneously the site generates a generic runtime error after awhile. I'm thinking this has something to do with my access database and multiple connections. I'm using forms authentication with a login page. Is...
2
4660
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 login forms for tasks like administration and configuration. The current ASP.NET seems only to allow to a single login form via the authentication element in web.config in the root directory. One work-around for our problem is implementing a...
8
579
by: TJS | last post by:
what are folks doing to get around limitation of one server form per page ?
7
3103
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 as follows: Friend F0 As frmMain Friend F1 As frmStart Friend F2 As frmSearch Then in my ShowPage routine (which is passed a string "pageToShow" which is the name of the form I wish to open), I first check to see if we already have an instance...
5
20013
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 separate Submit buttons. In basic HTML, I can have multiple forms on a page and the browser knows that if any of the fields for Form A have the focus, then pressing ENTER will send a Click to the submit button for Form A. Same for Form B, etc. ...
3
8715
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 page.The multiple select value then insert in database added by comma.The following is my code: Form Page:form.php <head> <script language="JavaScript"> function addSrcToDestList() { destList1 = window.document.forms.destList; srcList...
5
14123
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
4092
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 one for a certain bulletin list, however asp.net allows only one form per page with runat="server" attribute, I am aware of the visibility issue and that I can hide all of the forms except one but this won't help cause I need all of the three forms...
1
2434
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 have multiple input fields. In the container page I have one iframe page to display results "'iframeresults.htm". How can I send all the values of the input fields to one server page "process.php" where calculations are done and the results are...
2
2444
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 several forms and move from one form to next. However I need to have same action using only one form. Could someone show me how I can use only one form instead of multiple forms. Thanks -- Nejadian
0
8631
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8572
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
9115
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
8984
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
8847
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
8825
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
4340
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...
0
4579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2272
muto222
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.