user568171
user568171

Reputation:

ASP.NET Cross Page Posting via HttpRequest || Page.PreviousPage?

I've been developing classic ASP pages at the job for the past five years and now we are moving to ASP.NET. I'm trying to understand how to get form field values from one page to another and it seems like there is more than one way to do it. In classic ASPI just called request.form collection and got the information. Which way is recommended in .net? Cross Page, Transfer, or HttpRequest?

Gracias.

Upvotes: 0

Views: 320

Answers (1)

gbs
gbs

Reputation: 7276

It actually depends because I don't always use any particular method. Sometime it is easy to expose as property or sometimes just server.tranfer is fine or sometimes as querystring.

If data is sensitive and/or to many itmes I use Session where you can store an class object of custom type as well and not just basic data type.

And in certain cases I store stuff in DB and just pass an id to the record to next page via querystring or session and retrieve everything I want from DB.

Here is reference to different types available.

Upvotes: 1

Related Questions