DropDownList Event

4 posts, 0 answers
  1. Michael
    Michael avatar
    3 posts
    Member since:
    Nov 2012

    Posted 19 Nov 2013 Link to this post

    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
  2. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 21 Nov 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Michael
    Michael avatar
    3 posts
    Member since:
    Nov 2012

    Posted 21 Nov 2013 Link to this post

    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.
  5. Michael
    Michael avatar
    3 posts
    Member since:
    Nov 2012

    Posted 21 Nov 2013 Link to this post

    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.
Back to Top