mvc

Using xVal and a ViewModel

I saw a similar post that was trying to do this same thing with the Dinner example, but he fixed his issue mine seems to be a little deeper. Basically I cxan get the validation to work just fine but it only works in Firefox. In IE7 when the page loads, I immediately get an alert box with the following message: "Error: Element title is no...

When NOT to use MVC in a Web Application?

I was working on sketching out some ideas for a new project, and realized that I was having some difficulty getting things to fit into an MVC framework (In the case, CodeIgniter) In a way I liked. While I believed this can be overcome by working with the design some more and figuring out a better layout, It got me to thinking: could MVC...

can browsers [especially IE6] handle big Json object

I am returning a big Json object [ 5000 records and 10 elements per record] from the controller [asp.net mvc] using Jquery and Ajaxpost. till now I was dealing with just 20 records [testing] and it is working fine. But in production there are 5000 records so i am wondering if browser can handle huge amount of data. Especially IE6. ...

ASP.NET MVC - Go to a different view without changing URL

Hello all, is it possible to go to a different View without changing the URL? For example in my Index View, I have a link to go the the Details View but I would like to keep the URL the same. Thank you very much, Kenny. ...

Handling Spring MVC form:radiobutton with Jquery

hi there, has any one using Spring MVC with Jquery! i have got a strange problem when handling Spring MVC tags with Jquery. i used tags of spring MVC to get radiobuttons binded. <form:form name="Form1" method="post" action="Form1.do" commandName="Page1Command"> <form:radiobutton path="group" value="TTSE" id="DevGroup_TTSE" /> <for...

Design Pattern for passing a translation object around? For PHP

I'm updating an php web application that is becoming multilingual, based on the Zend MVC framework, and I'm trying to figure out the best approach to passing the translation object to different classes/layers. Most of my translation is done at the View level, but there are a few cases where I need to return status messages from custom l...

ASP.NET MVC DropDownList UI Template

Hi, I have a ui template for the property ShopID in my Order class. Instead of displaying the ShopID as an integer in my dropdown I want to be able to display the ShopName from my Shop class but when I post back to the controller method I still want the Order class to have the selected ShopID. How would I do this? ...

Where should form validation occur in a MVC project?

I'm using Kohana, but I think this question is more general. I have been doing form validation in the controller, and it has worked well so far. But lately, I've ran into a problem. I have a comments model, and I send comments from a few different controllers to it. Instead of having a validator in every controller, I placed it in the ...

Displaying item other than key with groupby foreach loop c# asp.net mvc

I am currently using groupby with a foreach loop to show a list of nested records. However I want to us an id as the key, so that I can use it to make dynamic css selectors etc.. But I want to be able to show the name of each of the groups before the secondarly loop is iterated through. I think the code will make it more clear. Basic...

Spring MVC Custom Authentication

What I am looking to accomplish is a filter (or similar) that would handle the authentication model for my Spring MVC application. My application is also hosted on Google App Engine. The authentication on this application can tend to be very dynamic and the permissions are not something that would fit cleanly into a predefined Role stru...

Call a model from a view when using MVC in joomla?

I am developing a custom component in joomla while trying to use MVC. How do I call a model from a view? ...

magento prices inclusive of tax

Hi there, I have set up my products so that their price is inclusive of Tax. However when I get to the Checkout page, the tax is being added to the Product Price. Where really it should only be there as a summary. Anyone know how to fix this? Regards, Fiona ...

How to replace the default ModelState error message in Asp.net MVC 2 ?

Hello, I need to replace the model state resource (to another language). I've seen some answers to the question above, but unfortunately I could'nt make it work. Any detailed answer or example would be appriciated. Thank you. ...

Where does ASP.NET MVC fall short against Ruby on Rails, CakePHP, et. al.?

I've been working quite extensively with ASP.NET MVC and I find it extremely useful (compared to WebForms), however I have some experience with other MVC frameworks and I feel there are definite gaps in capability. For one, in Drupal you can hook into just about anything and override it's View action. e.g. You can hook into the Drupal f...

Best ORM option from ASP.NET MVC to mySQL

I have been using Linq-to-SQL. What is a good option for working with mySQL? I have been looking at NHibernate, Entity Framework, etc. Some comparisons (pros, cons) would be helpful ...

How would you use the MVC pattern with Winforms when it comes to using ListViews?

My old way of handling WinForms application was throwing all the logic into the form itself. I'm trying to start utilizing MVC/MVP practices with my WinForms applications. Can someone show me an example of how I would use MVC/MVP in conjunction with say, a ListView? I use to use the Tag property of the ListView itself to store the obj...

call controller from a view

Hello, While developing a custom component I want to make a call to the controller from the view after the default template of view is rendered on the screen. How can I do it? ...

How do I protect a directory in asp.net MVC?

Hi There, What would be the simplest way of protecting a directory in asp.net mvc? Currently I have a folder of misc files which belong to numerous users of the site. Ideally I do not want one user being able to type the URL to one of these documents in a browser and have access to it. These files should only be downloadable through a ...

ASP.Net MVC Custom Authentication

I'm looking to create a custom authentication model for my MVC app but I'm not sure where to implement my custom IPrincipal and IIdentity classes. I don't want to do this in the Global.asax on every request as not all the pages in the site will need authentication. So my question is where? Should I be doing this in my custom action filte...

Why does MVC think multiple different addresses to the same page are SEO friendly?

It has come to my attention that http://www.example.com/Home/About is considered completely different from http://www.example.com/homE/abouT, yet they are the same page and both have header response of 200. These URL's should either be all lower or upper case and any variation should return a 301 and redirect to the all lower or upper c...