473,729 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple Dropdowns in a user control

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
3 1588
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
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*******@disc ussions.microso ft.com> wrote in message
news:DE******** *************** ***********@mic rosoft.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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
4674
by: lduperval | last post by:
Hi, I`m trying to do date calculations in three types of time zones: local, GMT and specified. The issue I am facing is that I need to be able to specify a date in the proper time zone, and I`m having a heck of a time doing so. I have created a form where I use drop downs do specify year, month, date, hour, minute and seconds. When the form is loaded, the dropdowns have to display the proper values for the current time zone type. This
0
1977
by: Pat Patterson | last post by:
I'm having serious issues with a page I'm developing. I just need some simple help, and was hoping someone might be able to help me out in here. I have a form, that consists of 3 pages of fields. I'd like to create a page in which all of this is stored as you move along as hidden variables, until the end, when the user submits. I can't figure out one thing: I have dynamic form elements (dropdowns), that I'd like to use instead of...
2
4770
by: Tom Bray | last post by:
Ok I am baffled I can not figure out this problem. I am getting the following error: Portal Error - A DropDownList cannot have multiple items selected. Error information Name Value Message A DropDownList cannot have multiple items selected. Source System.Web TargetSite Void RenderContents(System.Web.UI.HtmlTextWriter)
1
1464
by: Andy | last post by:
What I want to do is to populate multiple dropdowns when editing. Presumably... a) I should use a DataReader so that I can get each ResultSet for each dropdown control, and that should cut down round trips to the server. b) I should populate these dropdowns in the DataGrid_EditCommand? What I am having problems with is actually referencing the dropdowns on the template. e.g. I have a dropdown called drpAccessLevels, but I cannot find this...
3
2789
by: Nathan Sokalski | last post by:
When I view any page in my application a second time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize) +313 System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +201 System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +263
3
1217
by: Simon Harvey | last post by:
Hi everyone, I keep getting a problem with dropdownlist controls. It sounds really stupid, but my app is screwed as long as this keeps happening. It seems to spontaneously happen and then I cant fix it without rebuilding the whole page from scratch! Not Fun. :-( So whats happening is I have my dropdowns on the page. The user comes along and selects an option, but when the user submits the page,. its as if nothing
0
1007
by: jmawebco | last post by:
I would like to know of anyone could tell me if the following is possible; I want to create a user control that will retrieve data from a database and create 4 seperate dropdown lists. The data would be retreived using stored procedure with one parameter expected. The one stored procedure retreives all the data needed for the dropdowns. I current do this by calling a function which Binds the data from the stored procedure to the 4...
2
1273
by: Anup | last post by:
In my application there are many inter-dependent dropdowns. ie:- when user select value form dropdown1 according to that a query is fired and the data is populated in dropdown2 by applying the value selected in dropdown1 as filter. Now the user wants this process to be done at client-side as there are too many dependencies. (There is a database table in my project which stores all there dependencies.)
0
968
by: sbart | last post by:
I am programing in asp.net vb using AjaxToolkit cascadingDropDown. I do not have access to AjaxToolkit cascading dropdown event handlers. I have a series of dropdowns. The selection from one of the dropdowns (call it ddA) triggers the visibility of some of the other dropdowns. Problem is that f the user makes one selection from ddA, makes selections from additonal dropdowns, then goes back and changes the selection in ddA, the selections...
0
8925
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9288
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9206
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9154
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8156
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4531
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3240
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2166
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.