Two column array

D

David C

We have an asp.net 3.5fw application that needs to hold 5 2-column arrays
somewhere (cookie?) that we can retrieve at the opening of one aspx web
page. The array will hold a url location (column 1) and some text (column
2) that we can update in any page (probably from master page code-behind).
Can someone point me to an example of this concept or a sample snippet? It
would be similar to what is done in our "favorites" bar. Thanks.

David
 
N

Nick Gilbert

David said:
We have an asp.net 3.5fw application that needs to hold 5 2-column arrays
somewhere (cookie?) that we can retrieve at the opening of one aspx web
page. The array will hold a url location (column 1) and some text (column
2) that we can update in any page (probably from master page code-behind).
Can someone point me to an example of this concept or a sample snippet? It
would be similar to what is done in our "favorites" bar. Thanks.

Don't attempt to put important structured data in a cookie. Cookies are
useful for storing usernames, IDs and that's about it. Put it in the
Session or a database.

Overall, your solution just sounds rather weird! What actually are you
trying to do? There might be a better way to solve the problem.

Nick
 
D

David C

Mark Rae said:
Unless you have an absolute necessity to use arrays, forget about them. v2
of the Framework introduced generics which are much more powerful.

I would also strongly suggest that cookies should be considered only as an
absolute last resort.

Sounds like all you need to store a Dictionary<string, string> generic in
Session.

Thanks for your ideas. I am trying to store recently visited pages for an
internal intranet application. I only want to store the main pages so that
a person can go back to that page easily without doing another search. The
application keeps track of clients and workers so I want to store the page
link (with querystring) and the name of the client or worker. Then, when on
the main (home) page I can display them in a pop-up DIV for selection.

David
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top