I have Dropdownlist on my page and its selectedindexchanged method created in code behind file (.cs).
I wanted to create fake postback with A tag (onmouseover event).
First i viewed source of html.
<select name="ctl00$cpholder_ana$ddlFaturaNolar" onchange="javascript:setTimeout('__doPostBack(\'ctl00$cpholder_ana$ddlFaturaNolar\',\'\')', 0)" id="ctl00_cpholder_ana_ddlFaturaNolar">
<option selected="selected" value="CHOOSE"></option>
<option value="001926">[ 30.04.2009 - 156.492,00 TL ] 001926</option>
</select>
Then, I copied
onchange="javascript:setTimeout('__doPostBack(\'ctl00$cpholder_ana$ddlFaturaNolar\',\'\')', 0)"
And, I created A tag with mouseover event(to make Postback but as it fired by Dropdownlist)
<a onmouseover="javascript:setTimeout('__doPostBack(\'ctl00$cpholder_ana$ddlFaturaNolar\',\'\')', 0)">asdasdasdasdad</a>
But it didn't drop to SelectedIndexChanged method.
- First, WHY?
- Second, How can i do this?
Thanks from now.