M
Marc
Hello.
Apologies if this is the wrong group. I have created a class called
"page" which i would like to add to the global.asax and then call from
any control within the website. I have currently got:
global.asax
<%@ import Namespace="myNamespace" %>
<script language="C#" runat="server">
public page webpage;
void Session_Start(Object sender, EventArgs E) {
Response.Write("Session is Starting...<br>");
webpage = new page();
}
</script>
I then want to be able to call the "webpage" object in a control like
so:
webpage.methodName();
However i get a "type or namespace cannot be found" error. Can anyone
help me fix this or perhaps suggest a better method of persisting a
global object throughout the application - i am trying to avoid having
"page webpage = new page();" in each control.
Thanks,
marc
Apologies if this is the wrong group. I have created a class called
"page" which i would like to add to the global.asax and then call from
any control within the website. I have currently got:
global.asax
<%@ import Namespace="myNamespace" %>
<script language="C#" runat="server">
public page webpage;
void Session_Start(Object sender, EventArgs E) {
Response.Write("Session is Starting...<br>");
webpage = new page();
}
</script>
I then want to be able to call the "webpage" object in a control like
so:
webpage.methodName();
However i get a "type or namespace cannot be found" error. Can anyone
help me fix this or perhaps suggest a better method of persisting a
global object throughout the application - i am trying to avoid having
"page webpage = new page();" in each control.
Thanks,
marc