Click here to Skip to main content
15,894,405 members

Comments by rakesh4657 (Top 3 by date)

rakesh4657 29-Apr-11 6:26am View    
Deleted
[4:09:51 PM] GK: void Application_BeginRequest(object sender, EventArgs e)
{
/*( string curruntpath = Request.Path.ToLower();


curruntpath = curruntpath.Trim();
bool isredirected = curruntpath.EndsWith(".aspx");
bool isredirected2 = curruntpath.EndsWith(".html");
bool isredirected3 = curruntpath.EndsWith(".jpg");
bool isredirected4 = curruntpath.EndsWith(".jpeg");
bool isredirected5 = curruntpath.EndsWith(".gif");
bool isredirected6 = curruntpath.EndsWith(".png");
// string atr = curruntpath.Substring(curruntpath.IndexOf("/"));
if (!isredirected && !isredirected2 && !isredirected3 && !isredirected4 && !isredirected5 && !isredirected6)
{


HttpContext obj = HttpContext.Current;
string finalurl = curruntpath + ".aspx";


if (System.IO.File.Exists(Server.MapPath(finalurl)))
{
obj.RewritePath(finalurl);
}
else
{
obj.RewritePath("Error.aspx");
}
}

if (curruntpath.EndsWith(".aspx"))
{

HttpContext obj = HttpContext.Current;
//obj.RewritePath("Tohideextentions.aspx");
}*/

is it rite can yo help me
rakesh4657 29-Apr-11 6:24am View    
[4:09:51 PM] GK: void Application_BeginRequest(object sender, EventArgs e)
{
/*( string curruntpath = Request.Path.ToLower();


curruntpath = curruntpath.Trim();
bool isredirected = curruntpath.EndsWith(".aspx");
bool isredirected2 = curruntpath.EndsWith(".html");
bool isredirected3 = curruntpath.EndsWith(".jpg");
bool isredirected4 = curruntpath.EndsWith(".jpeg");
bool isredirected5 = curruntpath.EndsWith(".gif");
bool isredirected6 = curruntpath.EndsWith(".png");
// string atr = curruntpath.Substring(curruntpath.IndexOf("/"));
if (!isredirected && !isredirected2 && !isredirected3 && !isredirected4 && !isredirected5 && !isredirected6)
{


HttpContext obj = HttpContext.Current;
string finalurl = curruntpath + ".aspx";


if (System.IO.File.Exists(Server.MapPath(finalurl)))
{
obj.RewritePath(finalurl);
}
else
{
obj.RewritePath("Error.aspx");
}
}

if (curruntpath.EndsWith(".aspx"))
{

HttpContext obj = HttpContext.Current;
//obj.RewritePath("Tohideextentions.aspx");
}*/

}

Will The Above Code Work.
I m Not Gettin Can U Help me.
rakesh4657 29-Apr-11 6:18am View    
I M Workin On The Project So I need it.