Solved

MVC 4 and Entity Framework

Posted on 2013-05-12
1
503 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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

15 Experts available now in Live!

Get 1:1 Help Now