mvc

passing data from one partial view on another on the same page

Hello, How can i pass data from one partial view on another on the same page? i want a situation where the second partial view will be refreshed once the first one sends data to it. the partial views are on the same page. thanks ...

MVCContrib grid - select row

I have a MVCContrib grid that shows selected properties from an Account object. I want the user to select a row and be taken to another page to view the full properties of the object represented by the row they clicked. How do I add a .Selected action to the rows of the grid? ...

MVCContrib grid - sorting and paging

Every example I've run across demonstrating paging and sorting assume that the controller action that populates the grid does a getAll on the datasource. However in my application I am calling a web service that performs a search based on some form criteria passed in. When the pager or sort calls the action it sends nulls for all of th...

Navigation Controller: Storing controllers vs models

I have a navigation controller with a table view. In most tutorials I've read they usually have an array of view controllers (or subclasses of) stored locally in the table view controller that they use to push onto the navigation stack when a table cell is selected. In my current project I have a lot of data that is loaded from an XML ...

MVC 1.0 Compatibility with VS 2010

Hi We are planning to upgrade our technology to VS 2010. But I wonder if the MVC 2.0 is working properly since it has many issues raised from software developer who used it please see here: http://aspnet.codeplex.com/releases/view/41742.I want to use MVC 1.0 in VS 2010 is it compatible? ...

asp.net mvc and portal like functionality

fHi, I need to build an site with some portal like functionality where an param in the request will indentify the portal. like so http:/domain/controller/action/portal Now my problem is if an portal doesn't exists there must be an redirect to an other site/page and an user can login in to one portal but if the user comes to an other po...

Logging in MVC (Zend Framework)

Is there a best-practice when it comes to where to put the logging functionality in an MVC application, for example a Zend Framework application (Zend_Log)? Should I put the logging in the controller or in the model? Or in both? If in both, should they have the same logger or a separate one? ...

PHP MVC correct usage

What is the correct (recommended method) for passing information to a view in a MVC environment. Currently we use Zend Framework, where we write classes to handle specific things EG a Book class with a save and load method to retrieve info from the DB, which is called from a particular nameAction(). What I would like to know is w...

How to use personalized urls in asp.net mvc application.

I am working on a website in which many users can create their account and have a personalized page. I wish to provide them a twitter like url to access their pages, for example www.mysite.com/smith or www.mysite.com/john . I am using asp.net mvc 1.0. I have an understand that i can add routes to the global.asax file, but i am not able t...

HttpContext returning only "/"

I have the following two lines of codes in my model, however, both virtual and path have values "\". Where have I gone wrong? var virtual = VirtualPathUtility.ToAbsolute(HttpContext.Current.Request.ApplicationPath); var path =HttpContext.Current.Request.ApplicationPath; ...

Model object validates (TryValidateModel) but does not update (TryUpdateModel)

The Model object refuses to update on production server but has no issues on development machine. For the purposes of testing, I retrieve the model object and then immediately check its validation and update states, for example: Timesheet timesheet = _timesheetRepository.GetTimesheet(timesheetId); Helpers.ErrorHandler c...

MVC - Calling Controller Methods

Hello, My application is following the MVC design pattern. The problem I keep running into is needing to call methods inside a Controller class from outside that Controller class (ex. A View class wants to call a Controller method, or a Manager class wants to call a Controller method). Is calling Controller methods in this way allowed ...

What do you name your files when using MVC?

When using the MVC pattern, which I'm not terribly experienced with, I find myself naming things like this: /app/views/widget.php /app/models/widget.php /app/controllers/widget.php That appeals to me because it's easy to find associated classes, and I lean towards shorter names when practical. However, when I'm looking in my IDE, I se...

Mvc Cocoa Touch: How to get controller object for UIBarButtonItem target in view?

I got a basic application where I want the action method of UIBarButtonItem to be in the parent controller. My view has been created programmatically, so I can't use IBAction. RootViewController -> NavigationViewController -> NavigationView -> UIBarButtonItem Here's how have done it for the moment, it works for now... but it's not a ...

asp.net mvc dynamic data article

Can someone point me to great startup article over the mixture of ASP.NET MVC and Dynamic Data? ...

Rewrite query string "?x=y" style to "/x/y" style

I have a PHP MVC framework I've built from scratch which uses the traditional domain.com/controller/action URL routing. While I'm currently handling the below conversion in the router I'd like to replace them in the URL for cosmetic reasons. For example: controller/action?filter=bank Becomes: controller/action/filter/bank I've don...

Admin panel - what is the best way to display "static" data in the layout?

I'm about to write a admin panel for my CMS written in CodeIgniter. There will be some user information visible at all time - both in the layout's header section and the sidebar. I'm used to do it in a way that I personally hope and think could be done a lot easier, since I'm tired of sending the same parametres to the view over and over...

Return Json causes save file dialog in asp.net mvc

Hi, I'm integrating jquery fullcalendar into my application. Here is the code i'm using: in index.aspx: <script type="text/javascript"> $(document).ready(function() { $('#calendar').fullCalendar({ events: "/Scheduler/CalendarData" }); }); </script> <div id="calendar"> </div> Here is the code for Sch...

mvc error in url when contain "%" char

when I add "%" character to the mvc url prject I get bad request from server , how to let such character to be allowed in the url I want this to work if possible http://localhost:56203/Home/gf%test/194/184/w if I remove "%" it work fine thanks ...

Implementing Model-level caching

I was posting some comments in a related question about MVC caching and some questions about actual implementation came up. How does one implement a Model-level cache that works transparently without the developer needing to manually cache, yet still remains efficient? I would keep my caching responsibilities firmly within the mo...