Wednesday 13 March 2013

How to set Selected Value of Drop Down List in Asp.net Using JQuery

1. )



$('#<%=DdlLocation.ClientID%>').val('1').attr("selected","selected");

2.)

$("#<%=DdlLocation.ClientID%> option[value='1' ] ").attr("selected","selected");

3.)


$("#<%=DdlLocation.ClientID%> option[text='c' ] ").attr("selected","selected");



 

No comments:

Post a Comment