Wednesday, March 21, 2012

passing a string array?

How can I send a string array to another aspx page?Don't you want to use session object?

"agb" <agbeltekin@.mynet.com> wrote in message
news:%23%23o4VPUbDHA.4020@.tk2msftngp13.phx.gbl...
> How can I send a string array to another aspx page?
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

"agb" <agbeltekin@.mynet.com> wrote in message
news:##o4VPUbDHA.4020@.tk2msftngp13.phx.gbl...
> How can I send a string array to another aspx page?
Thanks a lot

"Sherif ElMetainy" <elmeteny@.wayout.net> wrote in message
news:uHTBHFVbDHA.2264@.TK2MSFTNGP11.phx.gbl...
> 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
> "agb" <agbeltekin@.mynet.com> wrote in message
> news:##o4VPUbDHA.4020@.tk2msftngp13.phx.gbl...
> > How can I send a string array to another aspx page?

0 comments:

Post a Comment