I am trying to post the following JSON data to an Action method on my controller...
{
"Id": "0",
"VendorId": "5",
"FirstName": "g",
"LastName": "g",
"Sex": "m",
"DateOfBirth": "",
"Address": "",
"City": "",
"State": "",
"PostCode": "",
"Country":…
I've implemented a WebGrid. Sorting, paging and filtering do not work together. They work when you use them alone. When you combine the three, at the same time, filtering doesn't work.
The symptom:
Filter the resultset, then sort.
or
Filter the…
I have an odd problem with one of my Razor views in an ASP.NET MVC3 application. I am getting an error telling me that a property cannot be found, when the property does seem to exist when I write out its value to the debugger console.
My view takes…
I am trying to place my javascript files with my views.
I have the following js file location.
/Views/Home/Home.js
However, when referenced with a script tag, it results in a 404 error.
As per the following SO question: ASP.NET MVC - Where do you…
I am trying to add a custom unobtrusive validation to my app. It does not seem to run the validation.
Here is my Attribute class:
public IEnumerable GetClientValidationRules(
ModelMetadata metadata, ControllerContext…
I have a form which the user can post without loging in. If however his email is recognized a password is required. The password form is validated over Ajax and if successfull the main form is submitted. Both forms require a valid…
I hope someone can help me with a solution to the following error. The application in which the error happens is running in production and I never experience the error myself. However around 20 times a day I receive an error mail telling me:
The…
I have this error:
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.
with inner exception:
Child actions are not allowed to perform redirect actions.
Any idea why this…
I am looking for the quick and dirty answer. I am just blanking, and after staring at a screen for over 12 hours now, I think I am shot.
I want to do a simple SignalR application as a tutorial. I found this example, but I keep getting the error…
When I try to build the project in asp.net mvc3. 27 errors appearing, saying that the mvc related classes dont exist:
Here is an example of one:
Error 1 The type or namespace name 'Controller' could not be found (are you missing a using…
As the title says, I'm looking for direction on how to properly test a controller extension. The extension renders a partial view which in turn I'm using within a JSONResult:
public static string RenderPartialViewToString(this Controller…
I've googled this and don't get any answers for my particular circumstance.
Im using Entity Framework in a suposedly simple way. I'm trying to add a record to the Memberproduct table. However I'm getting an exception that doesn't make sense.
Any…
Here are my requirements:
I'll be adding users to N amount of roles; defined in a database.
I need to protect each controller action with my authorize attribute.
For example, the web application would check if the logged in user belongs to either…
I have a view in MVC3 with a TextBoxFor bound to my model like so:
<%=Html.TextBoxFor(m => m.SomeProperty, new { @readonly = "readonly" }) %>
How could I change this to be a textbox which would have style="display: none;" by default?