Click here to Skip to main content
13,086,019 members (83,411 online)
Rate this:
Please Sign up or sign in to vote.
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.

Posted 2-Nov-12 5:22am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 2 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100