Last post Aug 30, 2011 10:42 AM by losbear
Feb 26, 2008 09:39 AM|crystalsoft|LINK
I want to cast String to GUID. I get the value of GUID using querystring. And now I want to convert this string into the GUID
I tried like,
Guid newid= (Guid)(Request.QueryString["id"]);
but it gives me built error like
cannot convert String to System.Guid
Plz help me how to do this...........
How i cast String to GUID
Feb 26, 2008 12:04 PM|nikki_doer_of_things|LINK
You can't cast it, you have to convert it.
See this link.
Feb 26, 2008 01:07 PM|gopalanmani|LINK
try to like this,
Guid g = new Guid(Request.QueryString["id"]);
Aug 30, 2011 10:42 AM|losbear|LINK
Thanks for this - I kept trying .ToString and CStr() with no luck. This worked great.