passing a string array?

  • Thread starter Thread starter agb
  • Start date Start date
Hello

There are several methods to do this, the best method depends on your
application.

1 - Put your array in a session variable. This method can be used with any
type of data

2 - Using cookies: concatenate the strings in one big string (use any
separator ';' for example ) then send it as a cookie to the brower, in the
other aspx page, get the cookie value, split the string to get the array.

3 - Same as method 2 but use a query string instead of cookies, for exampe
mypage.aspx?mystrings=str1;str2;str3;str4.

4 - Put strings in hidden form fields, and submit to your other page.

Best Regards

Sherif
 
Thanks a lot

Sherif ElMetainy said:
Hello

There are several methods to do this, the best method depends on your
application.

1 - Put your array in a session variable. This method can be used with any
type of data

2 - Using cookies: concatenate the strings in one big string (use any
separator ';' for example ) then send it as a cookie to the brower, in the
other aspx page, get the cookie value, split the string to get the array.

3 - Same as method 2 but use a query string instead of cookies, for exampe
mypage.aspx?mystrings=str1;str2;str3;str4.

4 - Put strings in hidden form fields, and submit to your other page.

Best Regards

Sherif
 
Back
Top