Hi,
I have a HttpModule in my ASP.NET application, in AuthorizeReques t event, I
want to detect if page is posted back. Is there a way?
using System;
using System.Web;
namespace MyModule {
/// <summary>
/// Summary description for PermissionCheck er.
/// </summary>
public class PermissionCheck er : IHttpModule {
// The stored application
private HttpApplication myApp;
public PermissionCheck er() {
}
public void Init(HttpApplic ation app) {
// Store off the application object
myApp = app;
// Wire up our event handlers
myApp.Authorize Request += new EventHandler(my App_AuthorizeRe quest);
}
public void Dispose() {
}
private void myApp_Authorize Request(object sender, EventArgs e) {
// I NEED TO DETECT POST BACK, IF SO I DON'T WANT TO RUN AGAIN
int userID;
if (myApp.Context. User.Identity.N ame.Length > 0) {
userID = Convert.ToInt32 (myApp.Context. User.Identity.N ame);
} else {
userID = 0;
}
string url = myApp.Request.U rl.AbsolutePath ;
}
}
}
--
WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy