VS2005中加了一个Global.asax后,只有几个事件:
void Application_Start(Object sender, EventArgs e) {
// Code that runs on application startup }
void Application_End(Object sender, EventArgs e) {
// Code that runs on application shutdown }
void Application_Error(Object sender, EventArgs e) {
// Code that runs when an unhandled error occurs } void Session_Start(Object sender, EventArgs e) {
// Code that runs when a new session is started } void Session_End(Object sender, EventArgs e) {
// Code that runs when a session ends.
// Note: The Session_End event is raised only when the sessionstate mode
// is set to InProc in the Web.config file. If session mode is set to StateServer
// or SQLServer, the event is not raised. }
我怎样加其他事件handler啊?如Application_AuthenticateRequest。如果我直接在里面写这个方法,它应该不会被执行吧?因为我并没有把这个delegate绑定到AuthenticateRequest这个事件上啊。
void Application_Start(Object sender, EventArgs e) {
// Code that runs on application startup }
void Application_End(Object sender, EventArgs e) {
// Code that runs on application shutdown }
void Application_Error(Object sender, EventArgs e) {
// Code that runs when an unhandled error occurs } void Session_Start(Object sender, EventArgs e) {
// Code that runs when a new session is started } void Session_End(Object sender, EventArgs e) {
// Code that runs when a session ends.
// Note: The Session_End event is raised only when the sessionstate mode
// is set to InProc in the Web.config file. If session mode is set to StateServer
// or SQLServer, the event is not raised. }
我怎样加其他事件handler啊?如Application_AuthenticateRequest。如果我直接在里面写这个方法,它应该不会被执行吧?因为我并没有把这个delegate绑定到AuthenticateRequest这个事件上啊。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货