c# - "Add new item" button within asp.net mvc dropdown list -
currently, adding items dropdown list in asp.net mvc application clicking on link on same page , adding item database table dropdown list bound to.
i want "link" item within drop downwards list list items like
item 1 item 2 item 3 add new itemand when user selects "add new item", dialog pop user can come in add together list.
i've been searching on net solution , cannot find anything, can point me in right direction?
thanks!
you should handle event of dropdownlist.. then, phone call dialog user can input value in dropdown. can accomplish using jquery:
$('#dropdownid').change(function (){ var drpvalue = $('#dropdownid').val(); if(drpvalue == "add new item"){ //call method or show dialog here; } });
there still 2 ways can manage add together straight dropdown:
post back using ajax c# jquery asp.net asp.net-mvc asp.net-mvc-4
No comments:
Post a Comment