global.asax, object tag and custom web control behind code

I've got defined an object in global.asax like this: <object id="G_obj" class="MyClass" scope="Application" runat="server" />

and I want to access the global object in a custom web control file CS:
public class admin : Control {
protected override void Render (HtmlTextWriter writer) {
writer.Write(G_obj.Text);
}
}
But, I can't compile that CS file, because compiler don't know anything about a global object G_obj, which will be defined in global.asax in a concrete application.
???
In the other way I can't test a syntax: Application["G_obj"] because Application isn't defined in derived class Control.
0
placek_martin
11/17/2003 1:49:04 PM
📁 asp.net.config-deploy
📃 12495 articles.
⭐ 0 followers.

💬 0 Replies
👁️‍🗨️ 965 Views

Reply: