I want to call javascript function on Dropdown menu selectedindexchanged. I tried this
<asp:DropDownList ID="selectVehicle" AutoPostBack="true" OnSelectedIndexChanged="GetRoute(this.options[this.selectedIndex].value);" runat="server" CssClass="inners">
<asp:listitem Selected>-- Select Vehicle --</asp:listitem>
<asp:listitem Value="16">Tata Ace</asp:listitem>
<asp:listitem Value="28">Tata 407</asp:listitem>
</asp:DropDownList>
Error
BC30456: 'GetRoute' is not a member of 'ASP.index3_aspx'.
Then I tried onChange instead of OnSelectedIndexChanged but it has no use for me since in my js function values inserted in textbox which is working but when page reloads textbox again gets blank & I can't turn off AutoPostBack since it is required to postback. Is is possible I can run javascript OnSelectedIndexChanged ?