void Application_BeginRequest(object sender, EventArgs e) { cmd = new System.Data.SqlClient.SqlCommand("sp_Checkurl", con_obj.conn); cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@url", url); da = new System.Data.SqlClient.SqlDataAdapter(cmd); ds = new System.Data.DataSet(); da.Fill(ds); con_obj.Conn_close(); if (ds.Tables[0].Rows.Count > 0) { HttpContext.Current.Response.Redirect(url); Dispose(); } else { HttpContext.Current.Response.Redirect("http://localhost:51262/Mywebsite/Blankpage.aspx"); Dispose(); } }
if (Request.Url.OriginalString.Contains("handler.aspx?menu_id=")) { Context.RewritePath("~/Handler.aspx"); return; }
if (ds.Tables[0].Rows.Count==0) { HttpContext.Current.Response.Redirect(url); Dispose(); }
HttpContext.Current.Response.Redirect(url);
Server.Transfer(url)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)