Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to pass data from one ASPX page to another like form submission

Status
Not open for further replies.

haroonkhalid

Programmer
Nov 6, 2001
16
SG
hi all ...
i m writing this to know that how to pass form data from one aspx page to another. like i have form on one page with abt 10 web controls and button to submit it. when i submit the button i need this data to be shown or processed on other page.

the form is by default submitted to same page but how to pass these values of web controls to next page??? or any object or structure to next page???

regards,
Haroon
 
put them into session and then response.redirect to the page you want, where you can extract them from session.
penny1.gif
penny1.gif
 
or response.redirect to the page including a query string on the URL That'l do donkey, that'l do
[bravo] Mark
 
Be careful to consider the number of users at the site. Paul's suggestion to use Session is a good one, but remember that the use of Session state is anti scaling -- i.e., requires server attention. I have a site which has an aspx page that allows the user to leave the page and view graphs, charts, etc... and return to the page some time later and after various pages have been viewed. In this case I wind up using about 35 Session variables per user. Since I am expecting no more than say, 100 people using this form at any given time, Session state should work satisfactorily (haven't read yet arguments on the upper limits and boundary conditions for Session).

However, if you have 10's of thousands of users, you may want to scale back on Session state and perhaps use Mark's suggestions, as one way, to transfer variables in the URL string. Transferring say, 20 variables, shouldn't be a problem on most servers.

You can also throw the variables into a Cache, q.v.,

txtMyText.Texyt = Cache("MyVariable")

...in which the variable can be retrieved later on the server. Cache variables are subject to random garbage collection if the server load increases. Normally this technique is used in conjunction with recreating the variable in case it's not there when you call for it. You can also cache entire aspx pages, or various collections of other objects.

One area in which I use a Cache procedure (and do not offer as backup the regeneration of the data because of the time frame) is on a graph page where I send several arraylist to the server as Cache objects. I create the graphs (ChartDirector) immediately following storage of the Cache variables (same code routine) and haven't experienced any problems here.

This is a good area, State Management, and it would be nice to see some "stats" etc... on the differences between these situations (user load, etc...).
 
Also see J. Frost's arguments in the Session post about 8 behind this one.
 
Isadore, just a quick tip for ya for these forums.
When you want to redirect someone to another post/thread just get the number of the thread (upper left corner of the post section). This post is number 855-344790, if i put the word thread in front and attach it to the number then it will become a link to the thread:

thread855-344790

hope this helps =) Daren J. Lahey
Just another computer guy...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top