How can I set a global variable in a C# web application?
What I want to do is to set a variable on a page (master page maybe) and access this variable from any page.
Just declare the variable at the starting of a class.
e.g. for string variable:
public partial class Login : System.Web.UI.Page { public string sError; protected void Page_Load(object sender, EventArgs e) { //Page Load Code }