My problem is not about url rewriting.
I want to change the url that is looking on browser.
For example the actual url is :
localhost:57358/Admin/news.aspx?Id=24
I want it to look like
localhost:57358/Admin/SomeContent....
to implement this I wrote a code in my global.asax but it is all about url rewiting.
protected void Application_BeginRequest(object sender, EventArgs e)
{
string sRequestedURL = Request.Path;
string url = Request.Url.ToString();
if (url.Contains("inner.aspx"))
{
int id = int.Parse(url.Split('=')[1]);
ManageNews mn = new ManageNews();
string title = mn.getTitleByNewsId(id);
string targetUrl = "~/inner.aspx?Content=" + title;
Context.RewritePath(targetUrl, false);
}
}
please help me regarding this.