Possible Duplicate:
Is it possible to declare an anonymous type in C# with a variable/dynamic set of fields?
I've built a query builder that constructs a query by examining some GET values that the user has set in my ASP.NET MVC3 application. This…
I have a project that I recently upgraded to ASP.NET MVC 3. On my local machine, everything works fine. When I deploy to the server, I get an error anytime I use a RedirectToAction call. It throws a System.InvalidOperationException with the error…
I have the following header of ASP.Net MVC page:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage"
ValidateRequest="false" %>
I need to move this…
I am working on an ASP.Net MVC 3 web application using EF 4.1. Since today, I am getting this error:
System.ArgumentException: Duplicate type name within an assembly
and I can't figure out what is causing it. It is happening in my repository when…
In one of my View pages I have a asp.net mvc PartialView. The PartialView contains some javascript (and jquery). In my asp.net main View I load the PartialView using ajax, within a div tag, in way given below. That is, from controller I return…
I want to serialize a simple object to JSON:
public class JsonTreeNode
{
[DataMember(Name = "title")]
public string Title { get; set; }
[DataMember(Name = "isFolder")]
public bool IsFolder { get; set; }
[DataMember(Name =…
I have such attribute which is checking for minimum and maximum string length:
[StringLength(10, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 3)]
public string PropertyName {get; set;}
Basically it is how it…
Currently, I have a global filter called GlobalizationFilter that checks the route values, cookies and browser languages header to determine the correct culture settings for the request:
public override void OnActionExecuting(ActionExecutingContext…
I found another question posted on here which provided a solution to the first part of my question, i.e. how to generate a 404 page in ASP.NET MVC WITHOUT redirecting to another page (so the originally requested url remains in the address…
Is there a way to set MSDeploy parameters in .csproj file itself of ASP.NET MVC project? Particularly a "skip" parameter, which should skip a "Temp" folder.
-skip:objectName=dirPath,absolutePath="\\temp"
.. or how can I pass this parameter into…
My Sencha Touch app is posting a form to my asp.net-mvc-3 WebService, but instead of sending POST it's sending OPTIONS.
I'm reading a similar thread here, but I just don't know how to handle the OPTIONS method in my code.
I did try adding the…
I have an action filter with the following signature
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class UnitOfWorkAttribute : ActionFilterAttribute
According to MSDN:
The AllowMultiple property indicates whether multiple…
I just started a MVC3 Razor application and started typing out in one of the .cshtml files and I added an a tag with href, when I entered the location it keeps telling me to use a directory that it wants me to use. I cannot get rid of this and it is…
Possible Duplicate:
After a computer crash my Visual Studio 2010 will not load an assembly
I have a web application in Asp.net MVC 3 developed in VS 2010. Today while working my laptop got rebooted due to some reason and from that time onward…
In MVC3, is it possible to automatically bind javascript objects to models if the model has nested objects? My model looks like this:
public class Tweet
{
public Tweet()
{
Coordinates = new Geo();
}
public string Id { get;…