Send the data:
Retrieve the data:
var filters = Request.QueryString["filters"];
var filtersDictionary = GetDictionary(filters);
private Dictionary GetDictionary(string filters)
{
var result = new Dictionary();
var matches = Regex.Matches(filters, "{(?.*?)}");
foreach (Match match in matches)
{
var keyValueArray = match.Groups["pair"].Value.Split(',');
result.Add(keyValueArray[0], keyValueArray[1]);
}
return result;
}
No comments:
Post a Comment