Solved

MVC httppost question

Posted on 2013-02-06
1
197 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
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 265 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

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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

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

11 Experts available now in Live!

Get 1:1 Help Now