I now have two asp.net pages. When I click on a link on page A, I open the other one (let’s call it page B). When I do this, I want to send some information from Page A to Page B in the form of an array of strings. This array is different depending on what link I follow on Page A.
I know I could send this information via the URL with the ?string1=bla1&string2=bla2 etc., but I don’t want it that way, as it can get complicated if there are too many strings in the array.
I think there is something similar, like a POST in PHP, but how would that be in ASP?
Any help would be appreciated. Thanks.
Cheers!
Just send the values in the URL. That’s likely the most correct way to do it anyways. Information that specifies what to display on the page should go in the URL. Pack them into a comma separated string if you don’t like going
string1=&string2=.Please don’t abuse the session for this, unless you have an absurdly large amount of data to pass. In that case, store them in a dictionary in the session with a unique key and pass that in the URL. This avoids many unexpected problems with slow connections and tabbed browsing and crawlers and whatnot.