By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,333 Members | 1,843 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,333 IT Pros & Developers. It's quick & easy.

@ Application directive in global.asax

P: n/a
Hi,

Global.asax can be configured to use code-behind class. In order to do that
"Implements" attribute has to be declared within @Application directive. I
have read that the base class (derived form HttpApplication) to inherit from
must be precomiled and stored in the \bin folder of the application. That
works fine. I have noticed, however, that @Application accepts also "Src"
attribute as the regular @Page directive does. In this case "Src" attribute
points to the source file of the base class. This also works fine.
My question is if "Src" attribute can be legally used or it is just an
undocumented feature of the @Application directive.

Marek.
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

Src attribute is part of the mechanism that ASP.NET uses to dynamically
create classes from ASPX declarations. src point to the class that the
programmer implemented. You can read my article on Code project:
www.codeproject.com/aspnet/ASPXFILES.asp

The same apply to Global.asax.

From MSDN : "RAD designers, such as Visual Studio .NET, do not use this
attribute. Instead, they precompiled code-behind classes and then use
the Inherits attribute."
Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

P: n/a
Thank you, Natty

"Natty Gur" <na***@dao2com.com> wrote in message
news:OH***************@TK2MSFTNGP11.phx.gbl...
Hi,

Src attribute is part of the mechanism that ASP.NET uses to dynamically
create classes from ASPX declarations. src point to the class that the
programmer implemented. You can read my article on Code project:
www.codeproject.com/aspnet/ASPXFILES.asp

The same apply to Global.asax.

From MSDN : "RAD designers, such as Visual Studio .NET, do not use this
attribute. Instead, they precompiled code-behind classes and then use
the Inherits attribute."
Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.