You can not make Postback directly using the HTML tag, rather i suggest use Asp.net server control set
AutoPostBack= true
and apply CSS OR define Theme as per the requirement..
still if you want to use HTML tag and want to make postback then you can write javascript and handle
onchage()
and call
__doPostBack()
as shown below:
<select id="cmbID" name="cmbname" onchange="CmbChange();">
<option value="Option1">Option1</option>
<option value="Option2">Option2</option>
</select>
Javascript:
function CmbChange(obj) {
var cmbValue = document.getElementById("cmbID").value;
__doPostBack('cmbID', cmbValue);
}
When
__doPostBack()
fires on client side, it will cause a postback, and using
Request.params
object we can get the parameters which we passed from the javascript code.
Request.params
looks like
{__EVENTTARGET=cmbID&__EVENTARGUMENT=Option2}
server side code:
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
string controlID = Request.Params["__EVENTTARGET"].ToString();
object controlValue = Request.Params["__EVENTARGUMENT"].ToString();
}
}
Hope this will solve your problem.