Click here to Skip to main content
14,982,843 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hello All,

I am trying to convert urls with query strings to SEO strings. I have already searched and used dlls from[^],[^] .I even installed visual studio 2008 sp1 to use its inbuilt functions. Sadly the ones i tried require that you know about the query string that is to be passed prior to using Response.Redirect. The Index is retrieved from database as per click on gridview.

My code looks like this:
On redirecting to a page by using this code
Response.Redirect("Details.aspx?ID=" + Index.ToString());

The url in the browser should show

rather than
<br /><br />
or<br /><br />

I have already searched and read articles in codeproject and other websites like Scottgu's blog[^]

I am using Visual studio 2008, IE9,Firefox 8.0. windows 7
Updated 24-Nov-11 23:20pm
D K N T H 25-Nov-11 5:30am
may i see your db query?


In .net 3.5, this is an in-built feature. Using System.Web.Routine namespace classes, This all is made very simple and straight forward.

go through bellow link

click here[^]
Praveen Kullu 25-Nov-11 7:51am
Excellent Link!! It works. Thank You!!
string id = Index.ToString();
id = Request.QueryString["ID"];

The code above is equivalent to Details.aspx?ID=5 if Index = 5

Please mark this as correct solution if it solves your problem

Best regards,
Praveen Kullu 25-Nov-11 5:58am
This isn't helping as i want to rewrite the url with query string .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900