Link to home
Start Free TrialLog in
Avatar of Starr Duskk
Starr DuskkFlag for United States of America

asked on

Changing a DropDownList - select Name

I have a dropdownlist that I need the clientidmode to be static.

<asp:DropDownList ID="ddlClientTest" name="ddlClientTest" clientidmode="Static" CssClass="" runat="server">
        </asp:DropDownList>

Open in new window


I have defined it explicitly in the code in front as above.

However, when it is rendered it adds another name to the front like so:

<select name="ctl00$ContentBody$TeamSearchGridControl$ScreenNameControl$ClientComboControlFilter$ddlClientTest" id="ddlClientTest" name="ddlClientTest">

Open in new window


I'm trying to add a Trigger for a button on a different control and it complains it can't find the ddl, so I suspect, that it is because of this renaming of the name. I view source code and that's the only thing that looks off.

        Dim newtrigger As New AsyncPostBackTrigger
newtrigger.ControlID = "ddlClientTest"
 UpdatePanelTeamGrid.Triggers.Add(newtrigger)

Open in new window


The error is:
A control with ID 'ddlClientTest' could not be found for the trigger in UpdatePanel 'UpdatePanelTeamGrid'.
ASKER CERTIFIED SOLUTION
Avatar of Geoff Sutton
Geoff Sutton
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Starr Duskk

ASKER

I'll give those a shot. thanks!