Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > multiple forms on single page?

Reply
Thread Tools

multiple forms on single page?

 
 
Davids
Guest
Posts: n/a
 
      11-10-2004
this was impossible to implement on old ASP, is it the same for .Net?


 
Reply With Quote
 
 
 
 
Jeff Dillon
Guest
Posts: n/a
 
      11-10-2004
Actually was not impossible on classic ASP.

Jeff

"Davids" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> this was impossible to implement on old ASP, is it the same for .Net?
>
>



 
Reply With Quote
 
 
 
 
Ken Dopierala Jr.
Guest
Posts: n/a
 
      11-10-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> this was impossible to implement on old ASP, is it the same for .Net?
>
>



 
Reply With Quote
 
=?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?=
Guest
Posts: n/a
 
      11-10-2004
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > this was impossible to implement on old ASP, is it the same for .Net?
> >
> >

>
>
>

 
Reply With Quote
 
Ian Suttle
Guest
Posts: n/a
 
      11-10-2004
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

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      11-10-2004
"Davids" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> this was impossible to implement on old ASP, is it the same for .Net?


Er...no it wasn't...


 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      11-11-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> this was impossible to implement on old ASP, is it the same for .Net?
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
resolve single line with multiple items into mutliple lines, single items ela Perl Misc 12 04-06-2009 06:47 PM
Forms with multiple submit buttons vs 'form' objects with single 'submit' methods neil.fitzgerald@ic.ac.uk Python 4 04-14-2006 04:58 PM
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
Handling multiple forms with single ASP page Ramachandran ASP General 3 08-21-2004 08:25 PM
Javabeans - handling multiple forms on a single JSP Chris Beach Java 0 09-08-2003 12:00 PM



Advertisments