/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
String urlString = "http://www.jwize.com?param1=valu1¶m2=value2"; var query = from match in urlString.Split('?').Where(m => m.Contains('=')) .SelectMany(pr => pr.Split('&')) where match.Contains('=') match.Split('=')[0], match.Split('=')[1]); query.ToList().ForEach(kvp => result.Add(kvp.Key, kvp.Value));
URL: http://snipplr.com/view/27185/get-url-parameters-using-linq/