ASpx to ASPx server control posting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

How do I post the data from webform1.asp to webform2.aspx

In classic asp you can use the request.form but when I do this in webform2 I
get nothing.
 
hi rob ,

maybe you can try not posting but putting your objects into the session and
call them from the other page.
for a better alternative you can try inheriting your web pages from the same
base class which has a protected method that reads/write into your variables
into the session.
 
Hi Rob,

Forget about classic ASP. Except for the environment, everything is
different in ASP.Net. A WebForm is a form that posts back to itself. This is
the ASP.Net paradigm. There are other ways to pass data from one WebForm to
another, almost all of them on the Server Side. You can use Server.Transfer,
and pass the entire HttpContext and present Page class to another WebForm.
You can generate an HTTP POST WebRequest. You can put a second form on a
Page, and use that to POST to the second WebForm. And several other
techniques, all of which are useful depending upon the situation.

If you treat ASP.Net like ASP (you CAN, but you SHOULD not), you will derive
no benefits from it. Learn the new paradigm, and leave the old behind. Once
you get used to it, you'll never want to look back again.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
Hi,

Assuming I understood the question correctly, in ASP.NET 1.x, you cannot
post back to a different page, but to the same one (resursive posting). Even
if you explictly specify a different form in the <form> tag, it will be
ignored.

HTH.

Hi,

How do I post the data from webform1.asp to webform2.aspx

In classic asp you can use the request.form but when I do this in webform2 I
get nothing.
 
Back
Top