We have a requirement to have our ASP.NET MVC websites be automatically closed down by a remote notification (change in database value). Where would be the best place to implement this?
Base Controller Class
Global.asax
Custom attribute
Other
Update
Lots of suggestions to use app_offline but this scenario will be happening daily and...
Hi All,
I recently upgraded a project I am working on to RC1 and I am absolute pulling my hair out. I am using AbsoluteRouting and I keep getting the following issue which is preventing me from upgrading. I have know cllue about whether you have any ideas but I thought I would see if you did (really appreciate any help you can provide :...
I'm building a controller that other controllers can inherit (provide base functionality across site without repeating code):
public abstract class ApplicationController : Controller
{
protected ApplicationController()
{
//site logic goes here
//what is the value of agentID from the Action below??
}
}
public c...
I am currently deploying my application built using RC of MVC ASP.NET on the production server which is showing nothing now.
The routes in my global.ascx are typical i.e.
routes.MapRoute(
"Default", // Route name
"{controller}.aspx/{action}/{id}", ...
This blogpost and one of our senior developers at work believe that web development has come full circle with ASP.net MVC. Its not really a question about VB script vs VB9/10 or whatever is the latest. Besides routing engine, helper classes and methods. What are some strong arguments you can make to say
ASP.net MVC != Classic ASP + ...
I'm trying to create an html table for order logs for customers. A customer is defined as (I've left out a lot of stuff):
public class Customer
{
public LazyList<Order> Orders { get; set; }
}
The LazyList is set when fetching a Customer:
public Customer GetCustomer(int custID)
{
Customer c = ...
c.Orders = new LazyList<O...
I'm working on an ASP.NET MVC project and I've come to the point where I want to start considering my caching strategy. I've tried to leave my framework as open as possible for the use in caching.
From what I heard during Scott Hanselman's podcast StackOverflow.com uses page output caching and zips that content and puts it into RAM. T...
I'm just trying to do some simple validation in MVC RC and am getting an error. For the purposes of this question, I am not using the UpdateModel.
Here is the code in the form:
<%= Html.TextBox("UserId")%>
<%= Html.ValidationMessage("UserId") %>
If I add the following line in the controller, I will get a NullReferenceException on th...
I'd like to customize the login error message that visitors get when their login attempt fails. In ASP.NET, you'd override the Login_LoginError event, as described in this 4GuysFromRolla article.
Anyone know how to do this in ASP.NET MVC?
Thanks in advance!
...
Given the following Model,
public class A
{
public string Name { get; set; }
}
public class B
{
public string Address { get; set; }
public A InstanceOfA { get; set; }
}
View,
<%= Html.TextBox("A.Name") %>
and Controller
UpdateModel<B>(b, collection.ToValueProvider());
my b instance will contain a property of A with an empty ...
Hi,
I am writing a web application that will allow a user to browse to multiple web pages within the website making certain requests. All information that the user inputs will be stored in an object that I created. The problem is that I need this object to be accessed from any part of the website and I don't really know the best way to ...
Today I gave in to all the banners asking me to test MS Expression web 2 demo.
After some setup hickups I fired up the thing and immediately encountered a problem:
How do I make this tool work with my asp.net-mvc projects? Actually, how do I make my websites work with ANY tool but visual studio 2008?
Untill now I did everything with VS2...
I have a complex JSON object which is sent to the View without any issues (as shown below) but I cannot work out how Serialize this data back to a .NET object when it is passed back to the controller through an AJAX call. Details of the various parts are below.
var ObjectA = {
"Name": 1,
"Starting": new Date(122164450...
hello,
one of the requirements of my current project is email integration with some fancy crm features (email from and to customer x attached to customer x and so on ... )
to accomplish this i need some kind of webclient that supports IMAP, gives me the ability to hook in some custom code and that can be embedded in my existing webclie...
Why do you need JavaScriptResult as a response?
Doesn’t it break the pattern of clean separation of concerns? Can you suggest me some cases where this will be useful?
...
I'm using ASP.Net MVC to create a web site which needs to do some processing (5 - 10 seconds) before it can return a view to the user. Rather than leaving the user staring at the glacial progress bar I'd like to show some sort of "Please Wait/We'll be right back" animated gif to keep them interested.
Does anyone know a good approach to...
Hi,
This one is causing me a few nightmares as I'm on the live box trying to work out what is going wrong!
If someone accesses our ASP.Net MVC website with the full URL http://www..net all is OK. If they go to: http://.net then our custom error page is shown. This used to work OK before we moved the site to MVC.
We do have an Appl...
I'm setting up a wizard. All of my wizard views need access to common data for display like TotalWizardSteps and CurrentWizardStep. I'm trying to find the best way to go about adding this common data to the ViewDataDictionary. I'm thinking of creating my own WizardStepViewPage. This subclass would have a property 'WizardData' which retur...
I keep reading about html helpers for images and a lot of other useful controls. The problem is I only get a few in the intellisense. I only get about 18 and they all seem form orientated (radionbutton, dropdownlist, beginform, etc)
My web.config has the folowing:
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=ne...
I read ScottGu's blog entry (http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx) a while back, and it seems to imply more functionality than I'm seeing. I have VS2008 and its service pack installed, and I am using a new MVC project with the RC1 version of asp.net MVC. I referenced the jquery-1.2.6.js ...