Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<td> @Html.DropDownList("ddl")



how to make post back for this dropdownlist
Posted

1 solution

If I understand the questions correctly you will need to use ajax to do this. In MVC controls don't have a postback method like they do in web forms. You will need to hook it up with javascript.

Here is an example of how to get that working.

JavaScript
<script type="text/javascript">
$("#ddl").change(function(e) {
   // Code to update the page or do what ever you need to do when the select changes.  
});
</script>
 
Share this answer
 
v3
Comments
member60 23-May-12 8:05am    
my 5!
Sandeep Mewara 23-May-12 10:23am    
5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900