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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem dynamically rendering DropDownList in custom control...

Status
Not open for further replies.

tcstom

Programmer
Aug 22, 2003
235
0
0
GB
Part of my Render method in a custom control contains the following code...

Code:
DropDownListOfStaff.Items.Add(new ListItem("test", "test"));
DropDownListOfStaff.RenderControl(writer);

...where DropDownListOfStaff is a DropDownList instantiated programmatically. The rendered HTML has this SELECT element but it contains no items? Why is this? I'm new to custom controls so I assume there's something I'm missing...
 
Sorry, my mistake, the problem was with how I was managing the ViewState. It's OK...!
 
Sorry, it was too long ago now. I really don't remember what I was working on...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top