Application["Akiii"] = "This is the value";
To access the above application object global variable in a different object, we have to do the following :-
string strGlobal = Application["Akiii"].ToString();
In the above, it is essential to use ToString method to convert the value otherwise it will give an compilation error stating "An object cannot be casted to string".
Thanks and Regards
Found interesting? Add this to: