Monday, May 20, 2024
Homepage · c#
 Popular · Latest · Hot · Upcoming
65
rated 0 times [  67] [ 2]  / answers: 1 / hits: 101617  / 12 Years ago, thu, september 20, 2012, 12:00:00

How use selectedIndexChanged from asp.net dropdownlist in clientSide and ServerSide?



In clientside i want call javascript funcition!



<script type=text/javascript>
function changeCursor() {
document.body.style.cursor=progress;
}
</script>

<asp:DropDownList ID=DropDownSubject runat=server DataTextField=Word AutoPostBack=True OnSelectedIndexChanged=SelectedChange>
</asp:DropDownList>


SelectedChange is a name of function in clientside!



Thanks for help!


More From » c#

 Answers
3

Add your client side function name in onchange events of dropdown like below :



<asp:DropDownList ID=DropDownSubject runat=server DataTextField=Word 
AutoPostBack=True OnSelectedIndexChanged=SelectedChange
onchange=changeCursor()>
</asp:DropDownList>

[#82988] Wednesday, September 19, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
josuea

Total Points: 609
Total Questions: 121
Total Answers: 104

Location: South Georgia
Member since Fri, Nov 13, 2020
4 Years ago
josuea questions
;