ASpx to ASPx server control posting

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.
 
E

Ersin Gençtürk

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.
 
K

Kevin Spencer

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
 
S

Shiva

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top