![]() |
| Finding DropDownList in Repeater |
|
jeffc7272
|
Hello,
I'm trying to figure out how to change the visibility state of a DropDownList server control that is inside a repeater. The visibility would be based on a condition of one of the DataItems. I'm using DataBinder.Eval to call the function to check the condition. The problem I'm running into is how to access the DropDownList control inside of the repeater. I've searched and searched but this aspx rookie can't find the solution! I'm sure it is simple. So what I have so far is: Inside the repeater: <%#generateDropDown(DataBinder.Eval(Container.DataItem, "Options").ToString())%> And the function: Public Function generateDropDown (ByVal checkOptions As String) As String **MISSING CODE HERE TO DEFINE ddlOptions AS THE DROPDOWNLIST CONTROL** If checkOptions = "yes" Then ddlOptions.Visible = True Else ddlOptions.Visible = False End If Return checkOptions End Function Anyone know how this is done? Perhaps there's a better way to do it too. Any help is greatly appreciated, Jeff |
||||||||||||
|
|
|||||||||||||
| Finding DropDownList in Repeater |
|
||
|


