2

Have started using Url Rewrite in asp.net.

I used to have a QueryString that looked like this

localhost/Booking.aspx?Id=ea297dbd-cdc1-40c4-8a01-cbd7e4854fb1

In C# I know how to get the querystring for Id like this

if (Request.QueryString["Id"] != null && Guid.Parse(Request.QueryString["Id"]) != Guid.Empty)
{
    Guid Id = Guid.Parse(Request.QueryString["Id"]);
}

Know I changed to used SEO so the url looks like this

localhost/Booking/ea297dbd-cdc1-40c4-8a01-cbd7e4854fb1

How can I get the value ea297dbd-cdc1-40c4-8a01-cbd7e4854fb1 in c#?

user3046164
  • 149
  • 1
  • 6
  • 14
  • You need to same, the format is changed but querystring value not changed.Please take look for more way http://www.codeproject.com/Tips/574956/How-to-get-URL-and-QueryString-value-in-an-ASP-NET – Ramesh Rajendran Jan 04 '14 at 08:26
  • Shoit should be **boldGuid Id = Guid.Parse(Request.QueryString["Booking"]);** to get the value ea297dbd-cdc1-40c4-8a01-cbd7e4854fb1? – user3046164 Jan 04 '14 at 09:09

0 Answers0