Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MVC httppost question

Posted on 2013-02-06
1
Medium Priority
?
203 Views
Last Modified: 2013-02-21
Hello all.

I have three views i am working with.  Each view is a form that the user fills out the first view called Product.   I have that first view bound to a productmodel class where in that model class i have validation.  once i submit in the productcontroller i have an httppost action wherr i pass the productmodel class in as a param and do a model.isvalid.  if valid i do a return View(Customer) which is a customer view.  My question is i want the customer view to be bound to a customermodel class.  How do i do that is that a redirectaction or something?  Im confused because i may want to also ref model binding of the productmodel as well.
0
Comment
Question by:sbornstein2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 1060 total points
ID: 38859536
My question is i want the customer view to be bound to a customermodel class.
Unless I'm misunderstanding your question, you simply need to declare the model type at the top of your Customer view.

e.g.

@model Customer

@* Some HTML *@

<div>@Model.Name</div>

Open in new window


Remember:  Little "m" is the declaration of the model type; Big "M" is the instance of the model  : )
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

688 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