This should be simple process but now it became annoying issue.
I am trying to pass multiple value in query string in my ASP.Net web report in VS2012. The page has to p
strPb1.Length will always be greater than 0 in your code. If there are no commas Split(',') will still return an array containing the original string. Therefore, your initial setting of value isn't necessary.
The QueryString and split() itself seem to be fine. Perhaps the problem lies elsewhere in your code or the querystring you're using. If you're going to add the commas back into your string, why remove them?
Also, An alternative to using a comma delimited parameter is reusing the same parameter. www.test.com/?pm1=test1&pm1=test2&pm1=test3
string[] strPb1 = Request.QueryString.GetValues("pm1");
if(strPb1 != null && strPb1.Length > 0)
{
for(int i = 0; i != strPb1.Length; i++)
{
//Code here
}
}