Posting Data ??

  • Thread starter Thread starter HANG LAM
  • Start date Start date
H

HANG LAM

Hi,

Simple question, Is there a way to post the data from one .aspx page
to another page ?


For example, I have a Page1.aspx that lets the user enter data like
"Last Name", "First Name", but I want post that information into another
..aspx page (Page2.aspx ) .
I know I can do a redirect to the second page ,but then I will have to
build a "query string" .

Is there a way just to post the data to the second page, just like the
old .asp pages did before .aspx without having to build a "query string" ?

Thanks,
hang
 
hang

I suspect what you are asking is - can you still use a post rather than a
get in a form action?

eg, <form action="page2.aspx" method="post"......

The simple answer is yes, these methods will still work without any
problems. You use the request.form("fldName") to retreive the data. There
are newer methods though which you should consider which make life a lot
easier....

If you have a number of fields on a page (within a form) you just have to
put an <asp:button> on the page, double click on the button in VS and this
will open up the code behind page. you can then just type in what you want
it to do from there.... eg me.lblresponse.text = me.txtTextbox.text.

Much quicker than the older methods. After recording the data you can then
transfer all the headers (including your post data) to another page if that
is what you require by using the server.transfer method.

If this doesn't really answer your question perhaps you could give us an
example of what you are trying to do

regards
 
Back
Top