asp.net mvc - how to fill MVC dropdownlist via javascript -
good morning, have view connected view model, has 3 parts general information simple model, address model list<> , telephone model list too, on view model. problem on new customer view, above view, address , telephone model empty, when give user opportunity add address , telephone model empty, when need fill 2 dropdownlists above data page loaded. question how can "refresh" dropdownlist data fill viewbag holds above data? in advance
when user clicks on add new address
button perform ajax call controller action return partial view containing template of address added dom. steven sanderson illustrated concept in excellent editing variable length list in asp.net mvc
blog post.
as alternative using ajax using pure client side approach. example use templating javascript framework such knockoutjs
. steven sanderson covered approach in his blog post
.
Comments
Post a Comment