Calling a method from a dropdown control

  • Thread starter Thread starter Doogie
  • Start date Start date
Are you binding the combo box every time the page loads even if it being

That was my problem, kind of. My code to fill the dropdown list is in
my page load of my user control and was happening regardless of it was
a post back or not so was going to the db and getting the data to fill
the dropdown everytime. Once I modified that to only occur when not
doing a post back, everything is working fine.
 
hi!

<select id="cbCarriers" onchange="return test();">
<option value='241'>3gp</option>
<option value='441'>aac</option>
<option value='1115'>ab1</option>
</select>

<script type="text/javascript" language="javascript">
function test()
{
alert("this");
}
</script>

Note: i have made slight changes in script tag
try with this code
 
Back
Top