Solved

How do I save value from dropdownlist to local variable of my customViewModel in MVC 3

Posted on 2011-03-10
1
592 Views
Last Modified: 2012-05-11
I don't know how i should write  ViewModel exactly. In same view I need to do read, update and create. In first, I thought it won't be a big deal, but now, it seems it is. (asp.net MVC 3)

For example:

I have: object1, object2 and object3

object1 is just to be read in [HttpGet]
object2 is created in [httpPost]
object3 is updated in [httpPost]

For update I don't have anything to bind to model, so I need a local variable to make this work.
How do I implement helper variable just for saving what user selected from dropdown so I can save object2 and object3 correctly?

Thanks
0
Comment
Question by:vjerch
1 Comment
 
LVL 19

Accepted Solution

by:
Manoj Patil earned 500 total points
ID: 35516155
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now