mvc

How does the MvcMusicStore tutorial get Edit Template views work?

Hey all, I'm in part four of the MvcMusicStore tutorial. I just finished creating my Edit template view and putting it in the Views/Shared folder. The problem is I can't figure out how to make it work. My controller action is: public ActionResult Edit(int id) { var viewModel = new StoreManagerViewModel { Album = store...

asp.net mvc datannotation unique field

i followed http://haacked.com/archive/2009/11/19/aspnetmvc2-custom-validation.aspx . it was fine till server side but how would i be applying client side validation for unique field validation scenario on for example say username. i want to have username as unique. ...

blank pages/routing issue with asp.net mvc 2 iis7 integrated windows7 vs2010

I've been searching though a number of posts and still can't seem to get a straight answer or at least one that works for me. From what I can tell is is some kind of routing issue. In fact I'm pretty certain of it. When I visit any of my web pages it comes back as a blank page with no data. Also I am using VS2010 asp.net mvc2 on window7...

Image storage/search web application

Hi, I work for a multimedia department of the government and we have a lot of images that we would like to share with others departments. Here some information: We have around 20TB of images and photos to share. We already have a windows 2008 environment running .net mvc web applications. We already have a mssql cluster in place. We ...

Cast from IEnumerable to Queryable in select statement?

Hello, I have a database repository with a bunch of access functions. I now want to build a fake repository which provides similar functionality for unittests. Unlike the real repository, this one uses simple lists instead of linqtosql generated model classes. Most fake repository funtions look exactly like the real ones, just with a...

Log4net in controller

Hi All I am using Log4net in my application for storing information in log file.I want to know can i use Log4net directly in controller. I mean is it necessary to add config setting for log4net. Please lemme know where i am mistaking for getting the concept. Thanks in advance. ...

Getting Ajax return to replace whole page

This is a followup question to the one I posted last week "Ajax.ActionLink not Posting". I did finally get it to Post, and it properly calls my Delete action and deletes the record. The Delete method returns a RedirectToAction("List") so that the new data set minus the deleted record is re-listed. Except that what actually happens is ...

Help for Web 2.0 PHP application

All, I have a Web 2.0 application written in Zend Framework and MVC. My application is growing bigger and bigger and I need to come up with a Help system for the entire application. I like the Xero's help interface and was wondering if there's an easy way to create this in PHP5 and Zend or if there are any PHP based tools that I can int...

Displaying an MVC page inside a webform iFrame

Is there a way to open a MVC Page inside an iFrame of a webform? ...

How do I get RESTful URLS in Spring 3 MVC?

Hi everyone, I'm having a frustrating time with Spring 3 MVC trying to build RESTful web services. I want RESTful URLs, e.g. "my.domain.com/items", not "my.domain.com/items.do" or anything else that includes an extension. My web.xml includes the following. Note the URL pattern: <servlet> <servlet-name>addictedWebServices</servlet...

What object handles switching views in a desktop MVC app?

In a desktop application that uses MVC, what object should be responsible for switching from one view to another? A controller at the next highest level of abstraction? (Conceptual question not particular to language/platform.) ...

Custom route & area in MVC 2

i'd like to map areas like this: /artists/{artistName}/images /artists/{artistName}/images/{imageId} /artists/{artistName}/blogs /artists/{artistName}/blogs/{blogId} /artists/{artistName}/albums /artists/{artistName}/albums/{albumId} in mvc2, how do i configure my area route and what does my file structure for my area view look like? ...

Tips/tricks for architecting MVC in non-trivial desktop app

What are some lesser known tips for implementing a loosely-coupled MVC structure in a non-trivial desktop application (e.g. having at least two levels of views/controllers and more than one model)? ...

How to 'introduce' view & controller in MVC pattern?

Using the MVC pattern in a desktop application, what's a good approach to introducing a view to its respective controller, and vice-versa? E.g., should you use constructor injection to give the view its controller, then have the view call a setView method on the controller and pass itself as the argument? (Question isn't specific to any...

DRYing ASP.NET MVC controllers and views

How do I share code among controllers of different models. In a 'super' controller action, I want to be able to figure out which controller (route) was called, and using that route name load the corresponding model, and use that model to query the database to pass to the view. I can easily do this in Ruby on Rails, does MVC allow such ...

Implementing MVC for Repeating Objects

I have several objects and a "template" to display these objects in: Name: $name Description: $description Price: $price Picture: $image Since the number of objects varies, how can I display these according to the MVC pattern? Should I wrap the template in a function and call it for each object? ...

.NET webservice in Flex MVC

I am working on a flex application which makes calls to an .NET webservice. I am trying to follow the MVC design pattern. I have created a model, which stores all information received from the webservice. The webservice itself is created by actionscript in the controller. The view in my case, consists of various user-defined components (...

ASP.NET MVC on IIS in windows 7, but page not always refreshing properly

i created virtual directory in IIS + Windows 7 for my MVC application, most of the pages are fine. However for example, I have Page A has action link to Page B, after I update/save detail in Page B it redirect to Page A. When I go to Page B again it still shows the old data, I need to refresh the page to show the updated data. This iss...

what features do you want in asp.net mvc 3?

Hi Guys, Just rounding up what features should be made available for the next release of ASP.net MVC 3. There is no news on the next version. But I really want opinion for people using ASP.net MVC to make feature judgments. As for starters I would like following features to be included Support of Visual Designers. Currently HTMl helper...

can hidden variables value be accessed in a controller in MVC

can we access the hidden variables values in a controller's ActionResult if the hidden variable's value is set in javascript? ...