F
Fernando Arámburu
Hy everybody,
I´m working on an ASP.NET framework and and I need to extend
System.Web.HttpApplication. I mean, I need to put some intermediate class
between System.Web.HttpApplication and Global class on Global.asax file.
What I need, in code, is the following:
public class MyhttpApplication : System.Web.HttpApplication
and then , Global class extends myHttpApplication
public class Global : MyHttpApplication
Till now, everything is ok, because nothing strange in on that. The
problem I found is that I need that both my class (MyHttpApplication) and
the Global class (on the Global.asax file) listen the same events or can
write code for the same events, for example,Session_Start y
Application_Start..
Why do I need this? Because I need to let the programmer works as he works
when Global extend HttpApplication and I also need to listen those events
because My Framework do something when those event ocurr.
The real problem is that ASP.NET at compile time, it generates explicit
calls to Application_Start and Session_Start using Object_Event way.
protected void Application_Start(Object sender, EventArgs e)
{
}
so I can´t have Application_Start on both my class (MyHttpApplication) and
the Global class, because is not possible to define the same method
signature without using the override, new or any keyword that may help.
I hope somebody has understood my problem and provide me a good solution
for my problem. I really need help cause my class needs to listen to those
events but I must let programmers to also listen to those events as the way
they did before.
Thanks in advance.
Fernando Arámburu
I´m working on an ASP.NET framework and and I need to extend
System.Web.HttpApplication. I mean, I need to put some intermediate class
between System.Web.HttpApplication and Global class on Global.asax file.
What I need, in code, is the following:
public class MyhttpApplication : System.Web.HttpApplication
and then , Global class extends myHttpApplication
public class Global : MyHttpApplication
Till now, everything is ok, because nothing strange in on that. The
problem I found is that I need that both my class (MyHttpApplication) and
the Global class (on the Global.asax file) listen the same events or can
write code for the same events, for example,Session_Start y
Application_Start..
Why do I need this? Because I need to let the programmer works as he works
when Global extend HttpApplication and I also need to listen those events
because My Framework do something when those event ocurr.
The real problem is that ASP.NET at compile time, it generates explicit
calls to Application_Start and Session_Start using Object_Event way.
protected void Application_Start(Object sender, EventArgs e)
{
}
so I can´t have Application_Start on both my class (MyHttpApplication) and
the Global class, because is not possible to define the same method
signature without using the override, new or any keyword that may help.
I hope somebody has understood my problem and provide me a good solution
for my problem. I really need help cause my class needs to listen to those
events but I must let programmers to also listen to those events as the way
they did before.
Thanks in advance.
Fernando Arámburu