Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello every one..

i have facing problem related to dropdownfor in MVC4.
i have a page "Index.cshtml". on this page i have one dropdownlist and one button named "btnDdl".
i have open a popup window "popupwindow.cshtml" on button click.
On popupwindow.cshtml i have one textbox and one button named "btnText".
i want to add textbox value(witch entered by user) into dropdownlist when clicked on button (btnText) and open popup window closed.

thanks
Posted

1 solution

1) Do these two views share the same ViewModel? If so then you can add the applicable values to the ViewModel and use that model to get the data back and forth.
2) If these two views use different ViewModels, you can add the values in question to each ViewModel and then use controller code to transfer the value from one model to the other.
 
Share this answer
 

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