void IHttpHandler.ProcessRequest(System.Web.HttpContext context) { if (context.Request.RawUrl.ToString().ToLower().Contains("/samples/")) { if (context.Session["UserID"] == null) { context.Response.Redirect("login.aspx"); return; } } context.Response.Redirect(context.Request.Url.OriginalString); return; }
< add name="SampleHandle" verb="*" path="samples" type="TestHandler.SampleHandle, TestHandler" />
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)