mvc

Having a single entry point to a website. Bad? Good? Non-issue?

This question stems from watching Rasmus Lerdorf's talk from Drupalcon. This question and his talk have nothing specifically to do with Drupal, by the way... it was just given at their con. My own question also has nothing specific to do with PHP. It is the single entry point in general that I am curious about. These days it seems that ...

What's the best place to put default content in an MVC application?

I'm working on a sort of a CMS/Wiki application to help me experiment with the new Asp.Net MVC framework, and I'm trying to wrap my head around some of the code organization. Right now, I have three views that cover displaying an article: Index, Edit, and Rename. All three views display the contents of the current page, or placeholder ...

C# model view controller

So I am creating a C#/Winforms application in a model-view-controller pattern. My view-controller needs to instantiate multiple groups of objects. The object groups are elements of the model and elements of the view. So for example a textbox and the model to go behind that text box. I'm wondering if the best way to do this is to put eve...

ASP.NET MVC URL routing doesn't give me pretty URLs

Hi there. I have set up an ASP.NET MVC project, and everything is working great, but I do have one problem with the routing. My Global.asax looks like this: public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Default", // Route name "{cont...

Where should I put this method in an MVC architecture?

I am writing an application using CakePHP and I am unsure as to where I should be putting my generateMapUrl function. function generateMapUrl($id = null) { if ( !$id ) { $this->Session->setFlash('Invalid Property Id'); } $this->read(null, $id); $url = "http://maps.google.com/maps?oi=map&q="; $url .= ...

Populating dropdownlist with selectlist in ViewData

I am trying to populate an HTML.Dropdownlist with a selectlist which is populated with a string value (a location address) and text (a location description) fields from a database call. I am passing the selectlist as viewdata to my view. The dropdown populates fine but when I go to use the value it is null or empty as seen by an alert I ...

Dropdownlist value not getting set from SelectList passed to view in ViewData

I am trying to populate a dropdownlist of office locations(text) and addresses (value) When viewing my page source in my browser after displaying the page I can see that the select (dropdownlist) option values are all "". Here is my code. I am using a LinqToSql data context call to get my data for the SelectList. In the debugger I can s...

MVC Ajax UpdatePanel

I know (at least i'm pretty sure) there isn't a control for MVC like the asp:UpdatePanel. Can anyone give me some idea on how to do this. I have a collection that i add entries to from my repository & services layers. in my masterpage i would like to show an alert depending on if there is anything in this collection. Normally i would h...

Error with server install of new MVC app and MVC Release Candidate 2

I have developed a small application using MVC RC2. The application works fine in my development environment, but fails when I push it to my production environment with the following error: Method not found: 'Void System.Web.Mvc.RouteCollectionExtensions.IgnoreRoute (System.Web.Routing.RouteCollection, System.String)'. App pool is r...

Totally Dynamic Form Creation: MVC or WebForms?

I'll start a new project, that will include forms whose inputs and their types (textbox, checkbox etc), Validation rules are defined in DB. I have to choose one of the frameworks for Form Creation, Form Validation, Edit/Insert Forms but I'm stuck. I doubt MVC will make handling Parent-Child relationship for Controls difficult. And altho...

mvc no codebehind strongly typed viewdata headers not working

I add that to my header <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> and am able to access ViewData and all its internals as well as all the mvc objects like url and html. As soon as I add "System.Web.Mvc.ViewPage<app.Models.tTable>" I have no access to any mvc classes and helpe...

Single Controller with Multiple Views

I am trying to create an MVC application with multiple view, but using a single controller. I started by creating a second route with another property that I could use to redirect to a second folder. public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); ...

Can ASP.NET MVC be applied to web services?

I'm architecting an web based application which will make use of web services. It has been recommended that I look into the use of the ASP.NET MVC Framework. All of the information I'm finding on the MVC discusses it's use with web pages, but I have found nothing regarding web services. Can the MVC be used for web services? and if so,...

Schedule Controls for ASP.Net MVC

Are there any scheduling components, commercial or otherwise, for ASP.Net MVC? Our company currently uses the Infragistics WebSchedule controls, but they don't appear to support MVC. Thanks! ++++Edit I think I may have been a bit unclear, I am not looking for a task scheduler, rather I am looking for a web calendar/appointment/schedul...

Where should "Master Page" logic go in MVC?

I'm experimenting with MVC, and my question is - where I had Page_Load logic in Master Pages with WebForms, where should it go in MVC? Here's the business case: Different Host Headers should cause different Page Titles to be displayed on the site's (one) Master Page, therefore all pages. For example, if the host header is hello.mydomai...

How do I call Initialize on a custom MembershipProvider?

Hi There, I have read through all the related questions, but I still unable to get the right solution for some reason, something is not right on my side, but not sure what's causing it. I have created a Custom Membership Provider, also changed my web.config to : <membership defaultProvider="MyMemberShipProvider"> <providers> ...

LoginStatus for ASP.Net MVC?

Hi There, How do I get the LoginStatus for ASP.Net MVC? I can connect and authenticate on MVC, but I am not sure how to get the LoginStatus, can anyone help? Thanks ...

MVC pattern + DDD pattern

In an MVC application, how is DDD implemented. What are the domain objects? If I map entities to custom objects, where does this mapping logic go, in the methods of the repositories or in the service layer? ...

Client side object velocity

I would like to create an object client side and add it to another object. I'm using velocity and Spring. I form a command object and pass it to the view as a backing object. I want to create and add a new object to this command object without saving either object to the db. The reason for this is that I want to have some persistence...

What are some patterns for creating views and controllers in an MVC or MVP app?

I'm working on a MVC/MVP GUI for editing a document. The document has a tree structure, with some nodes representing text, others images. The app model also includes a command stack, with commands operating directly on the model. Since different nodes have radically different controls, I'm planning on implementing individual MVC/MVP t...