I've doubt sessions are using in asp.net instead of sessions any other possibility is there in windo

Posted by Sudheep.grandhe under C# on 10/14/2011 | Points: 10 | Views : 912 | Status : [Member] | Replies : 4
Hi,
the below coding was used for asp.net.the same coding i want to use in windows applications.how can i do this.please do the needful

eg:Session["OrderNo"] = dt.Rows[0][0].ToString();

Best,
Sudheep.



Responses

Posted by: Gausi on: 10/14/2011 [Member] Starter | Points: 25

Up
0
Down
There is no concept of Global Variables in C# Windows Applications, you can use global variables inside the entire class but not in the entire namespace.

Solution for this problem is to create STATIC VARIABLES and use these variables anywhere in the namespace. Hope this might help

Regards,

Gaurav Singh
(gausi)

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 10/14/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

can you please give it with some example.it will help me a lot.please do the needful.

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jiji on: 10/15/2011 [Member] Starter | Points: 25

Up
0
Down


Hi,
You can define One Property and Set that Value to Property.Otherwise you can declare Global Variable in whole Applications.(Settings Application).

By
JIJI

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mittaikariss on: 10/18/2011 [Member] Bronze | Points: 25

Up
0
Down
Mr Sudheep u can use delegates otherwise events ................

u can declare global variable in static method and then assign value to variable ......then call that value from any form...........

http://www.invomtech.com/

....sundarsowmia....

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response