Solved

MVC httppost question

Posted on 2013-02-06
1
200 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 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

751 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