Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
MichaelP
Jedi Yak
2489 Posts |
Posted - 2002-10-03 : 12:47:16
|
This may be a bit off topic, but here goes.I want to have two forms on a ASP.Net page. Right now, I've got 1 Server form, and one "Old school" form. The Server form works fine, but I can not get the "Old school" form to submit. I've tried Submit buttons (that submitted the Server form), a Button with a myform.Submit in the onclick, etc.Anyone know of any samples of doing such out there?ThanksMichael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
|
ashok
Yak Posting Veteran
57 Posts |
Posted - 2002-10-07 : 05:02:24
|
the server form in asp.net actually does a server.transfer() to the target page, from within the submit() server side asp.net script of the page.if you add your own form (a.k.a old school..) you will need to set the ACTION property in the <form> tag...<form method="post" action="showReport.aspx" style="margin-bottom:0px; margin-top:0px;"> note that there is no runat=server property.you cannot use server side asp.net validation with such forms though...-ashokhttp://www.unganisha.org |
 |
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2002-10-07 : 10:58:52
|
Actually, I found a really good solution to my problem. If I make all the forms "Server Side" forms, and handle all of the on_click events server side, I can detect which button was clicked by looking at the request.form collection, and thus I will know what the user intended to do!ashok, I actually tried a solution like that, but the problem is this. When you use ASP.net it tends to make the WHOLE page a form. When you nest another form inside that form, it tends to submit the outer form, instead of just the inner form. I might have not been doing something quite right, but I found a solution anyway.Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
 |
|
|
|
|
|
|