Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/theme.php on line 507

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-content/plugins/codesnippet/codesnippet.php on line 248
Tryangled Dev » Blog Archive » how to rewriting URL in asp.net?

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.