| | |
Transfer data between pages
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
If you are using the .net framework 2.0 or greater, you may want to look at the PreviousPage property of the Page object.
For example, let's say you have a hidden field in your original page named
You could also use
For example, let's say you have a hidden field in your original page named
hfTheHiddenField and want its value when you get the target page. You can do something like this... c# Syntax (Toggle Plain Text)
Control ctrl; string theString; ctrl = PreviousPage.FindControl("hfTheHiddenField"); if(ctrl != null) { //cast it and get it's string value. theString.Value = ((HiddenField)ctrl).Value.ToString(); }
You could also use
Server.Transfer or the Request.Response objects to get values from previous pages as well. -Mike
or use a session variable ?
then get it back wherever you wish by using
then free up memory and
(SYNTAX VB.NET)
ASP.NET Syntax (Toggle Plain Text)
Session("session_name") = DATA
then get it back wherever you wish by using
ASP.NET Syntax (Toggle Plain Text)
Session("session_name").value()
then free up memory and
ASP.NET Syntax (Toggle Plain Text)
Session.remove("session_name")
(SYNTAX VB.NET)
When Autumn Falls [ http://www.whenautumnfalls.co.uk ] &&
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
Designdotworks [ http://www.designdotworks.co.uk ] Web / Graphic / Software Design
![]() |
Similar Threads
- Transfer Data From Pop Up To Main Page (ASP)
- Transfer Data from Pop-up to Main Page (JavaScript / DHTML / AJAX)
- Access table data transfer to file (MS SQL)
- transfer data from an asp .net page into a javasscript script (ASP.NET)
- how to transfer data with my friend on a LAN (Networking Hardware Configuration)
- IIS connection will not write data (ASP)
Other Threads in the ASP.NET Forum
- Previous Thread: Need Stored Procedure "sp_ValidateUser" for Login Page
- Next Thread: Adding color to GridView
| Thread Tools | Search this Thread |
.net 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox class commonfunctions compatible confirmationcodegeneration content countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox microsoft mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail rotatepage schoolproject security sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers





