Request parameter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would likew to ask if there is a way how to pass an array as a request
parameter.

For an example instead of using:
"general.aspx?prm1=string1&prm2=string2"

to use something like the following:

string [] myStrings={ "aa", "bb"};
"some.aspx?prm=@myString"

What would be the correct syntax?

Thank you.
Lubomir
 
Creating a function that returns a string, in the function loop through the
array and append the results, something like:

StringBuilder sb = new StringBuilder();
for (int i =0; i < myStrings.Length; ++i){
sb.Append("prm");
sb.Append(i.ToString());
sb.Append("=");
sb.Append(myStrings);
sb.Append("&");
}
return sb.ToString();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top