|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do you set the value of Drop Down User ControlI'm using a User Control to display a drop-down and when I "Edit" a screen,
I want to set the Drop-Downs value to the value obtained from the Database. Something like: ddlUserControl.ControlID.Insert(0,drReader("EmployeeName")) which doesn't seem to work. Help! Paul Why don't you just simply set the selected value:
ddlUserControl.SelectedValue = drReader("EmployeeName").ToString(); That is assuming that the value exists on the list. Regards, -Visar Show quoteHide quote "Paul D. Fox" wrote: > I'm using a User Control to display a drop-down and when I "Edit" a screen, > I want to set the Drop-Downs value to the value obtained from the Database. > Something like: > > ddlUserControl.ControlID.Insert(0,drReader("EmployeeName")) which doesn't > seem to work. Help! > > Paul > > >
SRE (Simple Rule Engine)
ImageButton bug AddHandler doesn't seem to work. Blinking Controls Help, DropDown Web Control not Retuning "SelectedValue" CUSTOMVALIDATOR works but page goes on on FALSE "Google Suggests" and the AJAX .NET Wrapper? CustomValidator VALIDA pero NO FUNCIONA Drop down listbox - extra properties, possible? REGEX para Email |
|||||||||||||||||||||||