Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating a list for drop down menu

Status
Not open for further replies.

SurvivorTiger

Programmer
Jul 9, 2002
265
0
0
US
Hi everyone,

I have several aspx pages and they all need to have a drop-down list. These drop-down lists need to be identical, but instead of writing html code for every page to create the long list of items, I want to use C# to dynamically create the drop-down list. For instance I could have the content of the list in a text file on the server, then my C# code would read the lines from the text file and create the drop-down list. I would greatly appreciate it if someone could help me with this.

Thank you
 
You will do better with ASP.NET questions in forum855. However if the list as actually a fixed list then it will be a lot easier to just use a server side include.

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Thanks johnwm...the list is in fact a fixed list...but I'm not sure how to do a server side include...
 
A quick search on these forums for 'SSI' or 'server side includes' will bring a wealth of examples.

Or you could google for 'server side includes' which (for a full explanation) will take you to

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top