This .net thing also supports global static variables in the global.asax
file. You can do this by...
--- global.asax ---
<%@ application Codebehind="Global.asax.cs" Inherits="TestVBNet.Global"
Classname="CommerceApplication" %>
<Script Language="C#" runat=server>
public static string strPublicString = "yo yo3";
</Script>
--- pagethatwillusetheglobalstaticvariabe.aspx ---
< %@Import <mailto:%@Import> Namespace="System"%>
<%@ page Language="vb" AutoEventWireup="false" %>
<HTML>
<HEAD>
<SCRIPT runat=server>
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Response.Write(CommerceApplication.strPublicString)
End Sub
</SCRIPT>
</HEAD>
<body>
<form id=frmX runat=server></form>
</body>
</HTML>
You can access the
variable by <ClassName>.<VariableName> -- where
<ClassName> is the value of the Classname attribute in the Application tag
in global.asax. You can also modify that variable - but i think it'll only
be initialized once when the application loads.