selectedindexchanged not firing with onchange method in javascript

Posted by Amitavin under ASP.NET on 4/8/2013 | Points: 10 | Views : 6912 | Status : [Member] | Replies : 0
please help me i'm facing a problem with dropdown list i'm using javascript method "onchange" to get dropdown selected value i get the value but dropdown selectedIndexChanged event not firing please someone help me

my javascript function is that for getting selected value:
<script type="text/javascript" language="javascript">
function showAddress_Byamit()
var e = document.getElementById("TabC_tp1_ddlcountry");
var country = e.options[e.selectedIndex].text;
javascript function work well it return selected value but problem with C# code behind

ID="ddlcountry" runat="server" AutoPostBack="True" Height="20px" EnableViewState="true"
OnSelectedIndexChanged="ddlcountry_SelectedIndexChanged" TabIndex="4" onchange="showAddress_Byamit(); return false"
Width="100px" ></asp:DropDownList>

here problem is that event "ddlcountry_SelectedIndexChanged" not firing

and in codebehind i add Onchange event as:
ddlcountry.Attributes.Add("onchange", "showAddress_Byamit(); return false");


(No response found.)

Login to post response