is there something I need to "turn on" to allow my asp.net mvc application to utilize custom exception filters?
I posted in here last week with code samples to a custom filter I wrote that should catch and handle a custom exception but for some reason I keep getting an error on my throw line indicating that the exception was not handled...
I have an Azure Web Role project that was recently MVC'd by another developer. According to the developer the app works with no problem when run on it's own (i.e. as a simple web app). However, when I try to run it in the context of the Azure cloud service, I'm seeing a number of 404 errors. I suspect something is not quite right with th...
I am trying the following, but I am getting : Object reference not set to an instance of an object.
HttpContextBase mockContext = MockRepository.GenerateMock<HttpContextBase>();
mockContext.Expect(c => c.Server.HtmlEncode("")).IgnoreArguments().Return("");
mockContext.Expect(c => c.Server.HtmlDecode("")).Return("");
controller.Con...
Doing validation in my binder, I'm wondering if there's a need to check the return value. In Option 1 below, is there ever going to be a difference in case 1 and case 2? It doesn't seem possible that TryUpdateModel would return true, but ModelState.IsValid is false.
Option 1:
if (TryUpdateModel(editItem, new string[] { "Field" }))
...
What would be a proper way to simulate a large number of requests to test if my web application can handle it?
...
Hello all, this is a follow-up to the question I posted yesterday. I was able to get the checkboxes implemented correctly, thank to all your suggestions. Now I'm trying to tackle the second issue which is maintaining the checkbox state during a page refresh or when a user clicks the back button on there browser. Again I have the follo...
DataAnnotations vs IDataErrorInfo
Pros and Cons of both?
Benefits of one over the other? (especially related to MVC)
...
Hey,
I've been searching how to add webforms to MVC project but there lots of sites explaining only how to add MVC to an existing webforms project.
Is there a way to do that ? Maybe need to add some code at Web.Config ?
The .aspx.cs can't find any control on the .aspx webpage, that's the trouble !
Thanks!
...
How do you set the result of an action result to use Post and not Get.
I need to redirect the result to an external site that requires the data to be sent using the post method.
(Would like to know also how to redirect to another action with a httpverbs.post filter - but not as important for me at this point).
...
I am attempting to deploy an ASP.NET MVC application in a subdirectory of an existing application and I am running into some routing issues. I have set up the folder structure such that all of the binaries and config files for the MVC app are correctly located in the root directory, while the rest of the content is in the subdirectory. A...
I have a master page that is in /Views/Shared. The master page references a stylesheet in the /Content folder.
Everything works fine if I reference the stylesheet using "../../Content/style.css". However, my web application is not in the root folder in our production environment, so the relative path doesn't work.
I have tried "<%=Re...
In my implementation I have a service layer to service my Aggregate roots. One of my aggregate roots is an order, to wich I have an OrderService.
For reference, the project is Asp.Net MVC.
On the update order page in the presentation layer a user can update their OrderLines. When the data is posted back to the server these are the acti...
The title is the error I get from the following code:
$(this).parent().slideUp(200, function () {
$("#testDiv").slideUp(200);
});
However the following code works fine:
$(this).parent().slideUp(200, function () {
$("#testDiv").html('hello');
});
Loaded libraries are jQuery, jQuery UI and qTip.
In IE8 I get the error as ...
I'm building an asp.net mvc application for users to enter an essay contest. I have an Essay table in sql server 2005. I created my domain models by dragging over the tables in the server explorer and saving the layout as, what I've named DAL.dbml.
I'm now trying to implement input field validation in the business layer using method...
This is likely a duplicate of the below question but the only answer is a dead link:
http://stackoverflow.com/questions/255008/minify-html-output-of-asp-net-application
When working with ASP.Net one of the more annoying aspects to me is the fact that Visual Studio puts spaces instead of tabs for white spacing which increases the size of...
Hi
I am trying to find the find the Text of the Table cell (from TD) that is CLicked.
Basically, my JQuery Code is not htting this line.
$("#myTable tbody tr").find("td:eq(" + i + ")").click(function() {
My table has 88 Records when i tried $("#myTable tbody tr").length
But it is not find "td:eq(".
Appreciate all responses.
...
Hi all,
I'm trying to show a ListBox with multi-selected values that come from the database. My plan is to build the selectlist in my controller, set the multi-select items in the SelectList then bind it to the ListBox as shown below:
Markup:
<%= Html.ListBox("DaysOfWeek", Model.DaysOfWeek) %>
Controller:
model.ScheduledDays = get...
Hello, I have an e-commerce system that allows a product to have multiple categories. In the admin user interface, I'm going to allow the administrator to be able to add as many categories to the product as he would like. What are some good ways to accomplish this? I don't want to do a select-list where the user has to hold down the cont...
I'm working through the Nerd Dinner ASP.NET MVC tutorial and am at the part right after I've created the project and am trying to run my unit tests for the first time. I see the test project and the AccountControllerTest.cs and HomeControllerTest.cs files that were generated but when I click on Test -> Run all options are greyed out. W...
Hi guys,
I am having a very weird issue in the way strings get stored in my database, and as a result, I am getting these "unterminated string literal" errors in Javascript.
Here's an overview of what I am doing:
Platform: C#/ASP.NET MVC 1.0, SQL Server 2005, SparkViewEngine, YUI 2
In my view, I serialize an object into a JSON data ...