hi here is my code for removing *.aspx extension from the current
page
protected void Page_Load(object sender, EventArgs e)
{
if (HttpContext.Current.User.Identity.IsAuthenticated)
{
string MyPage = System.IO.Path.GetFileName
(Request.ServerVariables("SCRIPT_NAME")).Substring(0,
((System.IO.Path.GetFileName(Request.ServerVariables
("SCRIPT_NAME")).IndexOf(".") + 1) - 1)).ToLower();
Response.Write(("<a href=\'/admin/siteadministration.aspx?
page="+ (MyPage + "\'>Edit this page</a>")));
}
}
i'm getting following error.please help me to get the proper result
CS0118: 'System.Web.HttpRequest.ServerVariables' is a 'property' but
is used like a 'method'