Keep URL in sync with selected control values

M

Matthias S.

Hi there,

first of all, sorry for the lengthy post, but restrictions in my languages
skills and the nature of the problem account for it.

I've got the following situation: I'm creating a control which will be
placed on most of my pages. The control contains a country dropdown, a city
dropdown and a street dropdown. When a country is selected, I have to repost
the page in order to load the cities. Same for a selection made in the
cities dropdown, but there I have to reload the streets respectively. The
reposting is required due to a massive amount of data. So far so good. I can
implement this without a problem.

The control should be aware of query string values send with the URL and
adjust the values in the dropdowns accordingly (and only if they make sense:
getting the id of a city which is not located in the selected country
wouldn't make sense, so in this case we fail). I can implement this as well,
no problem here.

But here goes the tricky part: Consider the following scenario: A user opens
a page from the bookmarks with the url
'http://blah.com/listsome.aspx?countryid=12&cityid=4&streetid=43'. Then
(s)he selects a different value in the street dropdown. The page is (due to
the eventhandler of the dropdowns indexchanged) posted back to itself.
Problem here: The url in the adresse bar has identical values as the initial
request.

And here we are, facing the problem with only one control. It is likely that
there will be more then one control on a single form, some of which might
want to load their settings from the querystring (and change the url if
changes in selections occur).

I'm out of ideas, so any suggestions would be greatly appreciated.

Matthias
 

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
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top