Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MVC3 MVC4
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 2-Nov-12 6:22am

1 solution

Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 6,769
1 Sergey Alexandrovich Kryukov 6,338
2 DamithSL 5,408
3 Manas Bhardwaj 4,816
4 Maciej Los 4,195


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 2 Nov 2012
Copyright © CodeProject, 1999-2014
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