Tuesday, April 21, 2009

Get URL value in code behind C# asp.net 2.0 ServerVariables with parameters

Get URL value in code behind C# asp.net 2.0 ServerVariables with parameters


Request.ServerVariables["SCRIPT_NAME"] /visli/Default.aspx
System.IO.Path.GetFileName(Request.AppRelativeCurrentExecutionFilePath) Default.aspx
System.IO.Path.GetFileName(Request.ServerVariables["SCRIPT_NAME"]) Default.aspx
System.IO.Path.GetFileName(Request.Url.ToString()) Default.aspx
Request.AppRelativeCurrentExecutionFilePath ~/Default.aspx

No comments: