By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,905 Members | 1,682 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,905 IT Pros & Developers. It's quick & easy.

Multiple Dropdowns in a user control

P: n/a
I am working on a site in which I would like to have two dropdowns that will
allow a user to navigate through the administrative pages of the site. The
first would allow the user to choose the particular site that they would
like to edit. The second would allow the user to select which admin screen
they would like to edit. The second dropdown needs to be populated based on
the selection in the first one. I want to encapsulate these dropdowns in
user controls so that I can easily add them to any page. Where I'm having
the most trouble is maintaining the state of the data from page to page
inside the user controls. Also, I was wondering if I should try to cache the
dropdowns or store them in a session object. Has anyone seen any examples of
this or have any good ideas on how to implement this type of functionaluty.
Any help would be greatly appreciated.
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Damon,

You wrote,
.....I want to encapsulate these dropdowns in user controls so that I can easily add them to any page. Where I'm having the most trouble is maintaining the state of the data from page to page inside the user controls. ...............

There are two things
1. You want to maintain state between postbacks on a the same page
2. You want to show the same data (in the first combo) in any page, once it is populated in any page.

Can you please clarify which one of the above you are dealing with (or is it some thing else) .

thanks
Nithin P V
Nov 18 '05 #2

P: n/a
I'm trying to do both. Here's how I'm trying to make it work.

A user logs into my site and goes to the main admin screen. They can have
multiple sites to administer and each site has multiple pages that can be
edited. So there are two dropdowns on this screen. The first will allow them
to choose a site to edit. The second one will allow them to choose which
page to edit on that site. The values in the second dropdown depend on which
site was selected in the first dropdown. I want them to have those two
dropboxes available no matter which page they are on.

Now to answer your question:

I'm trying to do #1 when a user edits a page. They will fill out the form
and click submit. That will cause the page to resubmit to itself to update
the database. So when the page reloads after the processing it should
maintain the state so that it will still have the dropdowns.

I'm trying to do #2 also. Whenever they choose an option in the first
dropdown I want them to be able to navigate around to different pages and
still retain the state of that dropdown. For example, the user will choose a
site (in the first dropdown) and then choose to edit page 1 (in the second
dropdown). After they are done editing page 1 then they could select page 2
(in the second dropdown). The state of the dropdowns would need to be
maintained through all these events.
The way I am trying to do all this is by putting the dropdowns in two
separate user controls and then including those controls in all the admin
pages. I'm open to other suggestions if there is a better way. I hope that
made things a little clearer.
"Nithin" <an*******@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com...
Hi Damon,

You wrote,
.....I want to encapsulate these dropdowns in user controls so that I can easily add them to any page. Where I'm having the most trouble is
maintaining the state of the data from page to page inside the user
controls. ...............
There are two things
1. You want to maintain state between postbacks on a the same page
2. You want to show the same data (in the first combo) in any page, once it is populated in any page.
Can you please clarify which one of the above you are dealing with (or is it some thing else) .
thanks
Nithin P V

Nov 18 '05 #3

P: n/a

Hi there Damon,

Did you find a solution to this, i am also trying to add two drop dow
lists into one user control with no luck at the moment, some advic
would be much appreciated

Thanks,

Ro

RM8
-----------------------------------------------------------------------
Posted via http://www.mcse.m
-----------------------------------------------------------------------
View this thread: http://www.mcse.ms/message349788.htm

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.