how to rewriting URL in asp.net?

void Application_BeginRequest(Object sender,EventArgs e)

{

string cpath;

 	String CustomPath;

 	Cpath = Request.Path;

	 cPath = cPath.ToLower();

 if (cPath.IndexOf( “/subfolder/” ) > -1)

 {

  CustomPath = “getContent.aspx?id=” +

Path.GetFileNameWithoutExtension( cPath );  // rewrite the URL

  Context.RewritePath( cPath );

 }

}



Posted By:V.Mahesh
Posted by Mahesh ( Tryangled )

Leave a Reply

You must be logged in to post a comment.