Solved

MVC 4 and Entity Framework

Posted on 2013-05-12
1
507 Views
Last Modified: 2013-05-16
Have another question about MVC. I have used the Model and Entity Framework to build and modify a SQL Server with CRUD. Couple questions about this:

You have a model with LabelA and TextboxA, LabelB and TextboxB, LabelC and TextboxC with each Label and Textbox combo displayed on its own line. In the View I wanted the Label and Textbox combo to display like this:
LabelB and TextboxB
LabelA and TextboxA
LabelC and TextboxC

or this:

LabelC and TextboxC
LabelB and TextboxB
LabelA and TextboxA

Since the Controller, View and Model work together to display DHTML, is this possible? I know the easy answer is to rearrange the Label and Textbox combos in the Model but I want to know if it can be done in the View and if so, how?
0
Comment
Question by:AmbassadorSpock
1 Comment
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
ID: 39161573
Your model doesn't contain textboxes, it contains data. I'm not sure why you have labels in your model (rather than using data annotations), but regardless, the View is the only thing that displays HTML (not DHTML). Simply write the view to display the information in whatever order/format you like.
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

Suggested Solutions

Title # Comments Views Activity
Need help on C# Linq query on object 6 53
C# application error "Parameter Is Not Valid". 3 80
Replace &lt; with < 14 57
Web Form VB.Net  import CSV 4 27
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

863 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

20 Experts available now in Live!

Get 1:1 Help Now