Re: Items in a dropdownlist
I'm not sure if this is viable in ASP.NET but I think you should be able to put your list items in an array or collection and bind your list controls to it. Then a change in the underlying array or collection should be reflected in each control.
Re: Items in a dropdownlist
Quote:
Originally Posted by sinha
Hi!
I am developing an asp.net application using c#.
I have to display some items in a dropdownlist. Same dropdownlist is displayed in several pages in my application. Presently, the items are hardcoded. For some reason, I dont want to pick it up from the database and populate it.
But since, the dropdown list is on several pages, I want a store, where I just change the collection (items) and my items in the dropdown list is refreshed in all the pages.
Can it be done. Can something be done with web.config?
Why don't you want to pick it up from your database?
Re: Items in a dropdownlist
Because there is no database in this application. Basically I am building a tool.
For this purpose only, I do not want to use a data base.
Anyway, I am doing that through a user control, which I am including in my page.