473,503 Members | 6,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

multiple forms on single page?

this was impossible to implement on old ASP, is it the same for .Net?
Nov 18 '05 #1
6 1908
Actually was not impossible on classic ASP.

Jeff

"Davids" <db****@simnet.is> wrote in message
news:um**************@TK2MSFTNGP11.phx.gbl...
this was impossible to implement on old ASP, is it the same for .Net?

Nov 18 '05 #2
Hi,

In ASP multiple forms were no problem at all. In ASP.Net you can only have
one form (Form1) for server controls. These will then be available to you
with their values when you post back. You can also add all the other forms
you want but they won't be as useable server-side. I believe you can still
get your values but you need to go through the Request object rather than
having an object that represents each control to work with. I may be wrong
about that last point though so hopefully someone who knows for sure can
talk about this. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Davids" <db****@simnet.is> wrote in message
news:um**************@TK2MSFTNGP11.phx.gbl...
this was impossible to implement on old ASP, is it the same for .Net?

Nov 18 '05 #3
You can only have 1 <form id="myForm" runat="server"> server control.
However, you can still use plain ole html forms with action="some url"; but
it cannot have a runat="server". Once you do this, you cannot have any
asp.net server controls within this HTML form tag.

There is a work-a-round comming is asp.net 2.0. Stay tuned!

"Ken Dopierala Jr." wrote:
Hi,

In ASP multiple forms were no problem at all. In ASP.Net you can only have
one form (Form1) for server controls. These will then be available to you
with their values when you post back. You can also add all the other forms
you want but they won't be as useable server-side. I believe you can still
get your values but you need to go through the Request object rather than
having an object that represents each control to work with. I may be wrong
about that last point though so hopefully someone who knows for sure can
talk about this. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Davids" <db****@simnet.is> wrote in message
news:um**************@TK2MSFTNGP11.phx.gbl...
this was impossible to implement on old ASP, is it the same for .Net?


Nov 18 '05 #4
If you are simply referring to a matter of having the tags in the same
page, but not needing to use them all at the same time, you can put
them in panels. When the HTML is rendered, only 1 FORM tag should be
visible (all panels with form tags but one should be hidden).

Perhaps if you explain your intent we can provide a solution.
Thanks,
Ian Suttle
http://www.IanSuttle.com

Nov 18 '05 #5
"Davids" <db****@simnet.is> wrote in message
news:um**************@TK2MSFTNGP11.phx.gbl...
this was impossible to implement on old ASP, is it the same for .Net?


Er...no it wasn't...
Nov 18 '05 #6
You can only have one visible server form on the page at a time.
So you could have more than one server form as long as you only show one at
a time.
Or you can have more than one form visible on your page at a time, but only
one of them can be a server form (i.e. with the runat=server attribute.)
Server forms only support posting back to themselves (not to other pages.)

This will all become more flexible in .NET version 2.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Davids" <db****@simnet.is> wrote in message
news:um**************@TK2MSFTNGP11.phx.gbl...
this was impossible to implement on old ASP, is it the same for .Net?

Nov 18 '05 #7

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

Similar topics

16
7449
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
1
4953
by: Chris Beach | last post by:
Hi, I have a JSP page with several forms on it. Some of these forms are generated dynamically, and each of them submits some information to a database. Handling one form is easy, as I can...
0
1939
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...
0
2200
by: rayone | last post by:
Hi folks. I need advice. 2 options, which do you think is the better option to display/retrieve/report on the data. Keep in mind reporting (Crystal), SQL Performance, VB Code, usability,...
2
4652
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...
3
3017
by: Pint | last post by:
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:...
11
2181
by: xenophon | last post by:
I have a web site with forms authentication and a single logon page. I have 4 subdirectories, each that should be protected by a different username/password combination. For testing purposes, the...
5
19990
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
8701
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
14103
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
7194
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,...
0
7070
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
7267
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,...
0
7316
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
7449
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...
1
4993
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
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
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
729
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.