passing a string array?

S

Sherif ElMetainy

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
 
L

luvdotnet sowhat

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
 

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

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top