This is a migrated thread and some comments may be shown as answers.

DropDownList Event

3 Answers 45 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 19 Nov 2013, 05:35 PM
Good afternoon --

I have a drop down list created that has the description as the text and a URL as the value.  I want the user to select an item from the drop down list and redirect them to the URL.  However, the event doesn't fire.  This is what I have on the form:

<telerik:RadDropDownList ID="MUQuickLinks" CssClass="QuickLinks" AutoPostBack="true" DefaultMessage="MU QUICK LINKS" OnSelectedIndexChanged="MUQuickLinks_SelectedIndexChanged" runat="server" TabIndex="1" ToolTip="Jump to a particular subject on our site." DataSourceID="dsQuickLinks" DataTextField="qlDescription" DataValueField="qlLink"></telerik:RadDropDownList>

And this is in the code-behind:

    Protected Sub MUQuickLinks_SelectedIndexChanged(sender As Object, e As DropDownListEventArgs)
        HttpContext.Current.Response.Redirect(e.Value, True)
    End Sub

Again, the event doesn't fire when the user selects an item in the drop down list.  The AutoPostBack simply reloads the page.  I've tried other events like OnItemSelected and the event still doesn't fire.

Any assistance is greatly appreciated.

Thanks,
Michael

3 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 21 Nov 2013, 07:58 AM
Hi Michael,

Please review the attached sample page where this functionality is implemented. I tested it with the latest version of our control and it's working accordingly. Can you confirm if it's working on your end?

Regards,
Bozhidar
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Michael
Top achievements
Rank 1
answered on 21 Nov 2013, 05:29 PM
May I see this in VB?  It looks like yours is identical to mine except for the fact that I fill the drop down from a database.
0
Michael
Top achievements
Rank 1
answered on 21 Nov 2013, 05:48 PM
Thanks for your assistance.  For whatever reason, my site master page has a directive of AutoEventWireup="false".  I changed that to true and now it works perfectly.
Tags
DropDownList
Asked by
Michael
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Michael
Top achievements
Rank 1
Share this question
or