I have a problem in firing a dropdownlist event.
I have the following dropdown:
asp:dropdownlist id="ddlhello" Runat="server" AutoPostBack="True" onchange="javascript:return ChangeHeader();"
I have also added an event in the code behind i.e. selectedindex change event.
Now the problem occurs when I execute the page: it executes javascript but the server side code does not fire. If I remove this line onchange="javascript:return ChangeHeader();" then the server side code fires.
When I checked the source page it shows me two onchange events associated:
one for javascript and other for server side.
I think that it is picking client side code and neglects server side.
I am not pretty sure, so I want to know the behavior reason.
And what is the way out for this.
I want server and client side code to be executed. I have searched for solutions but I have not found any correct reason.
Please help me.