I have a long php array which I loop through and create a form with. I am going to create a YAML file for it, for ease of maintenance. My problem is I don't know where the appropriate place is to store this file, and how would i invoke it from the view.
...
I have a page that displays a list with a of elements with a large number of elements, each of which has a boolean property, representing an Enabled and a Disabled state.
I need to provide the user with a link for each list item, and the link text must show the opposite status (so if the item is enabled, the link text must display 'Disa...
hi i am trying to create a URL that looks like this:
black/granite/worktops
where the black and granite will change so i have tried to create my own routes in global.asax.cs like so:
routes.MapRoute("Kitchen", "kitchen/[color]/[surface]/[type]",
new {controller = "kitchen", action = "surface"});
changing the...
As a matter of best practice in MVC, where should the logic go that deals with things such as password hashing/salting or data formatting before it gets sent to the database? I've read that the repository should only be used for logic that deals with data access. Is this something that belongs in a service layer? The controller? Does it ...
Many people know this article: more on getters and setters. I think it does a convincing job of portraying the evil side of getters/setters. I've also tested it by trying to convert an existing project (unfinished) to code without getters/setters. It worked. Code readability improved greatly, less code and I've even managed to get rid of...
I am tasked with making a custom ecommerce app that will populate purchase options from a table and keep track of orders, call paypal, etc. It will be pretty much like 'select options', 'enter payment info', 'confirm payment', 'setup account (now that payment is done)'. Another team here at the office is using MVC for a new project which...
I have a project with a lot of pop-up layering going on and while i will have one layer open, that layer will effectively serve as another window. I'm currently managing this with _json specific return pages that just return json objects and the layer acts on that. Each call from the layer is from a jquery .ajax call which processes ...
In this code in an Edit view, the correct vendor name text appears but it is not validated when I blank its textbox and push Save. The Vendor is a property of the Order model, and VendorName is a property in the Vendor model. They relate referentially. My form does not all input into a single table, but on satellite tables as well.
<%= ...
I have just started developing iPhone applications and I am very confused by how the "view controller" aspect of the user interface works.
I did the "Your First iPhone Application" tutorial on the Dev Center. It has you set up your own view controller class and then initialize it using initWithNibName. So it seems that nib files contain...
Is it at all practical to try to use Joomla or Drupal to design anything but brochure-ware or a blogging website? Are the modules/extensions frameworks really flexible enough for designing web applications that have a lot of data entry and reporting capabilities, or would you just be better designing it using a MVC framework, ASP.NET or ...
authentication problem on windows vista (iis7) (cookie is getting written but httpcontext.current.user is null)
...
For my actions that are going to interact with the User's account, I would like to create a "TheUser" object in addition to adding that object to "ViewData["TheUser"]" as soon as any action on my controller is called.
If the User is logged in, it will grab the User's info from the database, if not, "TheUser" object will just be null.
I...
I've been reading several articles on MVC and had a few questions I was hoping someone could possibly assist me in answering.
Firstly if MODEL is a representation of the data and a means in which to manipulate that data, then a Data Access Object (DAO) with a certain level of abstraction using a common interface should be sufficient for...
The agavi framework uses the PUT request for create and POST for updating information. Usually in REST this is used the other way around (often referring to POST adding information while PUT replacing the whole data record).
If I understand it correctly, the important issue is that PUT must be idempotent, while POST does not have this r...
Hi,
is it possible to route an hiearchical path to map an relation from the database as follows:
Lets say I have an tuple/entity "page" with an m-t-m relation to a "page" (it selfe) and I want to be able to combine the slug-value of each page to find an appropriate page, like so:
mydomain.com/firstpage/secondpage/thirdpage
where first...
I'm using Url.Encode within a view and it's replacing spaces with + so instead of:
/production/cats-the-musical I'm getting .../cats+the+musical.
I'm sure this is an easy one, but where do you go to configuring which characters are used for this?
I'll be doing this:
public static string EncodeForSEO(this UrlHelper helper, string unen...
In my MVC application I have a folder full of PDF documents users should be able to view. However, my links to them don't seem to work: I get a "resource can't be found error". I'm guessing my problem has something to do with routing.
What do I need to do so that the browser just renders the documents?
...
Hey everyone,
I am working on an ASP.NET MVC project and I am trying to get it integrated with facebook by using facebook connect API. Now, I am having a small problem in imagining how the conceptual layout would be. I am using the repository model in MVC, I have my own DB. I want to be able to fetch user’s information from FB, and may...
Hi
I am doing MVC and have look-up values in drop down lists. When calling UpdateModel only values before the look-ups get updated and nothing afyer. I get no errors though.
I can edit and create and use the following code in my cintroller:
ViewData["SiteMaintenanceId"] = from m in this._siteRepository.FindAllSiteMaintenances().ToLi...
Let's say my main controller 'hotels' has a pattern for the url, such as:
/hotels/colorado/aspen/hotel-name/
How should I program my controller ( keep in mind I'm still learning MVC ) to handle this variable?
I know that I have to probably check if anything after /hotels/ is set, otherwise show the default hotels page.
If a state is s...