469,299 Members | 2,069 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,299 developers. It's quick & easy.

How to get the value from one form to another form

hi........
am a new join programmer as a fresher....
in vb.net we can get the values of first form to second form by creating a object for the first form and take the values using that object in second form,but
i want to know how to retrive the data from one form to another existing form using c#
Nov 28 '06 #1
4 6087
kkmar
5
Hi

You can just use Session and pass the values.I am sure there might be some other way this is simple way to do.


Example

Session("textboxval") = txtbox1.value;

Call this session value on another page as

str = Session("txtboxval")

Try this not sure if there is any other way.
Nov 28 '06 #2
hi........
am a new join programmer as a fresher....
in vb.net we can get the values of first form to second form by creating a object for the first form and take the values using that object in second form,but
i want to know how to retrive the data from one form to another existing form using c#
the simplest way is...... it is posible by declaring global varible common to both form then it is possible call the first form value in thye second.... try it if you need further guide mail to me by kasspro@yahoo.com
Nov 28 '06 #3
AricC
1,892 Expert 1GB
Most people tend to stay away from global variables. Use session variables. Here is an old scripts post about using global variables.


HTH,
Aric
Nov 28 '06 #4
bplacker
121 100+
whats wrong with global variables??? I'm just asking, because I use them quite a bit.
Nov 28 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Bills | last post: by
9 posts views Thread by ckerns | last post: by
1 post views Thread by meganrobertson22 | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.