global variables
-
What is the best practice if i want some information to be available in all the forms. Is it good to have global variables. If not then please tell me some other alternative.
Mohinder Singh
I think one of the best way is creating the datacontainer class and storing there by having private variables and public properties. There are many ways to store but depends on the size,security ...........
Thanks and Regards Sandeep If you want something you never had, do something you have never done!
-
What is the best practice if i want some information to be available in all the forms. Is it good to have global variables. If not then please tell me some other alternative.
Mohinder Singh
You can use sessions also
Cheers Navaneeth!! www.w3hearts.com
-
I think one of the best way is creating the datacontainer class and storing there by having private variables and public properties. There are many ways to store but depends on the size,security ...........
Thanks and Regards Sandeep If you want something you never had, do something you have never done!
-
You can use sessions also
Cheers Navaneeth!! www.w3hearts.com
-
To make sessions you need to create it like this;
Session("Name") = "Adrian"
This Session is now stored with a string called "Adrian". This session can be called from any page you want within the project. If you want to dispose the session;Session.RemoveAll()
I hope i helped you in some ways.Adrian De Battista - Web Designer, Web Programmer, Software Programmer From Malta. My Website .. www.MaltaTrade.org
-
You can use sessions also
Cheers Navaneeth!! www.w3hearts.com
Suppose that I want to send a private message to a person and sender name and reciever name is saved in 2 session variables like this.Session["sender"] and this.Session["Reciever"]. Now I open 2 browser and in browser one ,click on person1 "send message" bottun and go to a page to writing message body, and then in browser 2 click on person2 "send message" bottun and go to a page...! Now I go to browser 1 and click on "Send" bottun. the value of this.Session["reciever"] is person2 but I want to send message to person 1 . What should we do in this case ?