In am using HTML select control (Not .net server control DropDownList), and i want to set an item selected of a particular value, from server side.How i can do this. I am using asp.net as a server side technology.
Following is my select box.And I dont want to add runnat=”server” property in it
<select id="ddlPriceBetween" name="ddlPriceBetween">
<option value="0" selected="selected">All</option>
<option value="1">Less than 10,000 Rs. </option>
<option value="2">10,000 - 20,000 Rs. </option>
<option value="3">20,000 - 30,000 Rs. </option>
<option value="4">30,000 - 40,000 Rs. </option>
<option value="5">40,000 - 50,000 Rs. </option>
</select>
If you don’t want to use
runat='server'or ASP dropdown then you can’t access it on server, One thing you should consider that beauty of html tags is that it is render at client side and it has no direct server communication. so if you want then you need indirect way to set the selected with jquery or javascript, ie you can set hidden field with selected value and on document ready you can set selected value.For example : Set selected value
working demo