开发者

How to trigger RenderAction from dropdown list selection?

开发者 https://www.devze.com 2023-01-19 16:17 出处:网络
I have an ajax form. In this form i have 2 drop down lists (Office and Departments) and a \"Filter\" Button.

I have an ajax form.

In this form i have 2 drop down lists (Office and Departments) and a "Filter" Button.

When filter button is clicked my ajax form is set to update "content_main" with my new filtered list.

My question is... how can i get Office (when a selection is made) to trigger a RenderAction on the DIV element containing my list of dependent departments (over writing it with a dropdown li开发者_JAVA技巧st of Departments in that office)?

Hope this makes sense,

Thanks in advance for any help,

Kohan.


I fixed it,

I have an onchange event on my dropdown that fires an ajax call to my PartialViewAction, this returns a partial containing my dropdown list bound to the model i want and then this overwrites my container DIV.html.

job done.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号