asp.net-mvc-2

I can't add Microsoft.SqlServer.Management.Common to my ASP.NET MVC Application

I am trying to add a reference to the above assembly but it does not appear in my ASP.NET MVC .NET 4 (Not client) applications Assembly list. Does anyone know how to reference this Assembly? ...

ASP.NET MVC 2. Javascript Error when deployed to IIS7.

Hello guys and girls Been working on a ASP.NET MVC 2 solution for some time now and today I decided to test in in the IIS7 so I could put in on a company server for my colleagues to play with. However I got quite a surprise when I hosted it. I started to get Javascript errors in code that worked while running it locally in my VS2010. ...

How can we Route something like {calendar}/{controller}/{action}/{id}

As a beginner in MVC I'm trying to figure out what's the best way to accomplish a route for my needs, and I'm getting no luck at all, so I'm kindly ask for any help My webApp is driven by Calendars, and per each Calendar there are a bunch of actions Subscribe Edit Calendar View Winners Daily Challenge etc... and I would like to avoi...

Passing the form action attribute to a Partial View

Hi, I have a partial view that I am using from 2 different forms. In order to use jQuery validation I would like to use the tag instead of the Html.BeginForm helper. This means that I should specify the action attribute myself just like ASP.NET MVC 2 does when I call the Html Helpers. My questions are: How can I do it? Are there bett...

CRUD Update, changing entity relationship with dropdown using ASP.NET MVC 2, and NHibernate

I'm running into a few problems with CRUD Update (Edit) scenarios where an entity relationship is altered via drop down list of possible entities, using ASP.NET MVC and NHibernate. Probably I am just doing something stupid, so I was wondering if someone could give me a quick example of how this should be done, as I haven't been able to ...

Hacking attempts yields "The controller for path '...' was not found or does not implement IController"

We get notified of every error on our MVC2 web application. And we've receiving errors for controller path not found for files we know don't exist and therefore we believe are hacking attempts System.Web.HttpException: The controller for path '/zencart/install.txt' was not found or does not implement IController. What's the best wa...

Returning a response on error in AJAX call using ASP.NET MVC and jQuery?

Hi, In my controller's action method, I call a WCF service, which could return a FaultException containing a business rule violation message. I have a BaseController that overrides the OnException method as below. Since I call the controller action using AJAX, I check if the request is AJAX and only return a Content result. If it was n...

How do I set the correct decimal separator in IIS 6.0?

Hello everybody, I hope you can help me here... I have a conflict with the decimal separator on my host's dedicated server. The DB (SQL SERVER 2005) uses dot as decimal separator. As a fact, if you query it directly using SQL Server Management you would get dots. However, when the application (.NET C# MVC 2) is running it uses comma inst...

Validating uniqueness with data annotations in asp.net mvc

Hi, I have various questions about validation using data annotations. I am using the following setup asp.net mvc 2 entity framework 4 data annotations Basically, I'm trying to get unique validation working and i'm a little confused. My models are as follows: public class Buyer { public int Id { get; set; } [Required(Erro...

Dynamic validation on MVC 2

This works fine [MetadataType(typeof(Area_Validation))] public partial class Area { ... } public class Area_Validation { [Required(ErrorMessage = "Please add this field.")] public int Email { get; set; } [Required(ErrorMessage = "Please add this field")] public string Name { get; set; } } but how about if Area_Valida...

ASP.NET MVC 2, Windows XP, and IIS 5.1

I'm getting headaches from trying to host MVC 2 on XP's IIS! (This is on VS 2008, but probably applies to VS 2010 as well.) After much struggling I eventually found a way to display my MVC 2 site from IIS 5.1, but the problem is that there is no styling! Any ideas on how I should fix this? The problem is probably the path location. Fol...

Is there an ASP.NET MVC book which uses NHibernate for ORM?

I'm learning ASP.NET MVC but I prefer to use OS X and MonoDevelop(especially Mono 2.8 is out now, supports ASP.NET MVC 2). Is there an ASP.NET MVC book that also teach how to use NHibernate and Postgresql or MySQL? (No Sql Server, as that would entail me installing vmware/parallels in OS X) ...

ASP.NET MVC: add new SQL Server database gives login failed error

Hi, I'm just getting started with ASP.NET MVC. I'm following the NerdDinner tutorial (http://tinyurl.com/aspnetmvc). On page 20 of the PDF. I am adding a new SQL Server database to the project, and confirming that I want to add the .mdf file to the App_Data folder (from the prompt "Do you want to place the file in the App_Data folder?...

ASP.NET MVC DDD E-commerce - Admin and front separation

Hello, I'm going to write an ASP.NET MVC 2 application using Domain Driven Design. I'm trying to figure out how to separate the Admin from the store front. I could create 2 MVC projects, but regarding the services for them, should they be in separate projects as well or could I use the CatalogManager, for example, for both, Admin and the...

How to import an ASP.NET MVC app from VisualStudio to SharpDevelop ?

I'd like to import an ASP.NET MVC 2 app from Visual Studio 2008 to SharpDevelop v4.0. I'm using: * Windows 7 * IIS 7.5 * .net SDK v4.0 * VisualStudio 2008 * MVC 2 * SharpDevelop v4.0 Beta r6767 Thanks a bunch beforehand ...

MVC 2 Form Values not posting

Hey all I am attempting to learn MVC 2 and ASP etc through the MVC Music Store. At the same time I am attempting to conform what it is doing to a solution I am developing at work. The overall structure is an IT Help Desk ticket system and I am working on the very broad admin functions of creating, editing, and deleting tickets. I h...

Get DisplayName Attribute without using LabelFor Helper in asp.net MVC

What is the best way to retrieve the display name attribute for an item in your model? I see a lot of people using the LabelFor helper for everything, but a label isn't appropriate if I just want to list the data out. Is there an easy way just get the Name Attribute if I just want to print it out in, say a paragraph? ...

Telerik Html.Grid Style Sheet issue

I started using the Telerik Html.Grid today and have already run into a problem. The Grid itself is appearing, but text based so i know this is a style sheet issue. Also, i have been following the usage instructions with the documentation. Ill go through them and explain what i did, maybe my interpretation was wrong. 1)Open an existing ...

Formatting Date on Html.TextBoxFor - other solutions not working.

Using EF-generated classes, here's my metadata class: [DisplayName("Approved Date")] [DataType(DataType.DateTime)] [DisplayFormat(ApplyFormatInEditMode = true, HtmlEncode = false, NullDisplayText = "", DataFormatString = "{0:MM/dd/yyyy}")] ...

How to change link without reload (MVC2 / AJAX problem)

Hello everyone, I have been following this example http://demos.telerik.com/aspnet-mvc/grid/selectionclientside?theme=webblue, and have finished it for my spec. In my spec, the top table lists the name of a number of different database tables, and then the bottom displays the data of whichever specific table name was clicked. Now I hav...