Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 24th, 2007, 07:23 PM
Authorized User
 
Join Date: May 2007
Posts: 73
Thanks: 4
Thanked 0 Times in 0 Posts
Default transfer values between webforms

I want to trancsfer a value from one form to another.

Can someone explain me through code what are the different opitions available?



Cheers




Cheers
Sheraz
__________________
Cheers
Sheraz
 
Old July 24th, 2007, 08:19 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You can pass the value through a query string, session, place the value in a database and retrieve it so on and so forth.

The easiest would be a query string or session value.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========
 
Old July 25th, 2007, 12:47 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it depends on what you want to pass, if it's a secure date you should use either sessions or database (sessions are much easier) .. you just say in your first page "session["mySession"] = myObject;" and in the second page you convert it to what ever your object it.

as for none secure data, you can send it through query string (URL) by using the following code: "Responce.Redirect("myPage.aspx?param1=value1&para m2=value2&param3=param3")"
and on myPage.aspx.cs use the following code "string strparam1 = Request.QueryString["param1"]"

of course NEVER send sensitive data through URL, and it only works with strings .. hope I helped you man..

contact me if you needed anything :)




Nothing is impossible. The impossible only takes longer. "Digital Fortress, Dan Brown"
 
Old July 26th, 2007, 06:42 AM
Authorized User
 
Join Date: May 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to DarkForce
Default

yeah
Session rules

Ivan





Similar Threads
Thread Thread Starter Forum Replies Last Post
Transfer Values from one page to another page saravananedu ASP.NET 1.0 and 1.1 Basics 6 August 17th, 2005 12:03 AM
Dynamic Webforms?? MAtkins General .NET 1 December 10th, 2004 06:46 PM
Transfer of Form Values in Javascript pkdev Javascript How-To 3 June 21st, 2004 05:15 AM
Transfer of values from an object to an XY chart locusiste Excel VBA 0 April 23rd, 2004 05:02 PM
messagebox in webforms nmohammadi Forum and Wrox.com Feedback 2 June 6th, 2003 06:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.