Solved

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

Posted on 2011-03-10
1
593 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
This collection of functions covers all the normal rounding methods of just about any numeric value.
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 use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

920 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

16 Experts available now in Live!

Get 1:1 Help Now