| | |
Transfer data between pages
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
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: Checkbox list
- Next Thread: save .aspx page as .html file
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox class click commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu dynamic edit findcontrol flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery list listbox menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news numerical objects order panelmasterpagebuttoncontrols problem radio ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopemnt webdevelopment webservice xml youareanotmemberofthedebuggerusers





