472,345 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,345 software developers and data experts.

multiple forms on single page?

this was impossible to implement on old ASP, is it the same for .Net?
Nov 18 '05 #1
6 1847
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
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...
1
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...
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...
0
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...
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...
3
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...
11
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...
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...
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...
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...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

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.