I'm trying to run an ASP.NET MVC 2 web application under IIS on Windows 7, but I get a 403.14 error. Here are the steps to reproduce:
Open Visual Studio 2010
Create a new ASP.NET MVC 2 project called MvcApplication1
Shift+F5 to run the app. You should see http://localhost:{random_port}/ and the page will render correctly.
Click on MvcA...
Can I use Jquery to call an action and then change the image when it success, just like stackoverflow's post voting function?
In my view, I'm using the following code, but I don't want to refresh the browser. Can anyone provide some code about this for me?
Many thanks.
<%if (!item.IsPrinted)
{ %>
<%=Html.ImageLink("~/Content/imag...
I just upgraded my site from ASP.NET 3.5 to 4.0. I've been working through some breaking changes and there were more than I expected.
One I can't figure out, however, is why my <asp:Substitution /> control suddenly stopped working like it should. It's supposed to ignore the output cache settings of the parent page and update upon ev...
This is probably a pretty simple question, but I don't see how to view in browser like I would for a traditional asp.net application.
...
After installing the official VisualStudio 2010 (had installed and uninstalled RC before) I cannot create MVC projects.
When I try to create a new "MvcWebApplicationProjectTemplate.cs" project, I got the following error message:
Reinstalling MVC 2.0 didn't helped :(
...
I've just installed Visual Studio 2010 and have created a new MVC2 project so that I can learn about the changes and updates and have discovered an issue with areas that I'm not sure what to make of.
I created a new EMPTY MVC2 project
I right clicked the project and, from the context menu, added a new area called "Test"
In the new test...
How do I create a menu in a ASP.NET MVC2 Master Page, dynamically based on the current user's "role"?
...
Hi!
I'm trying to integrate NHibernate.Validator with ASP.NET MVC client side validations, and the only problem I found is that I simply can't convert the non-interpolated message to a human-readable one. I thought this would be an easy task, but turned out to be the hardest part of the client-side validation. The main problem is that b...
I have a page with a menu that uses JQuery AJAX calls to populate the page with. To reflect any changes I update the URL with a #... instead of ?... or /... So an URL that originally reads : htpp://localhost/pages/index/id=1 would look like : http://localhost/#pages/index/id=1. If a user bookmarks this, and later comes back to the page, ...
Hello to everybody.
I've found a very good article about how to use EntLib Validation Block for server validation in MVC 2.
But as there pointed out
The current design of EntLib’s Validation Application Block uses the Composite pattern; that is, when we ask for validation for an object, it returns back a single validator object that...
I'm trying to create an editable grid using Asp.Net MVC 2 and Silverlight (specifically a grid that displays info from a db and allows users to update that info).
So far I've managed to put a silverlight grid on an a view, using this technique
However I have no way of getting the updated data from the silver light grid. Is there anyway...
Everything seems to work fine until i want to submit the form and update the database.
Wildcard mapping works on requests like "/navigation/edit/1", but when i submit the form as:
var ajaxPost = function(Url, Params) {
Ext.Ajax.request({
url: Url,
params: Params,
method: 'POST',
a...
I make Views/About/Index.aspx and Views/Faq/Index.aspx + Controllers/AboutController.cs and Controllers/FaqController.cs controllers for these purposes.
I want to have one controller Controllers/DefaultController.cs + Views/About.aspx and Views/Faq.aspx in the root, for example.
How to set it up?
...
I have the following default and only route:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
In my Site.Master I have the following:
<%= Html.ActionLink("Profile", "Details", "Use...
I have a new WIndows Server 2008 R2 x64 DataCentre with Framework 3.5 SP1 and Framework 4 installed. When I install my MVC application (VS 2008 MVC 2.0 using a Web Setup project installer) and browse to the application I get an error that System.Web.Mvc cannot be found. If I copy the relevant DLLs (System.Web.Mvc etc)into the bin directo...
I have a page using mvc2 with client side validation. The client side validation is provided by Microsoft Ajax mvc validation script. This does very well to validate all fields that are related to the model.
I also have fields that are never sent to the server such as the confirm password value, and the accept agreement. For these fie...
I am taking the values from a search form in my application to build a dynamic query:
string queryString = @"SELECT VALUE USERS FROM ProjectDBEntities.Users AS Users
WHERE ";
There are two tables in the database, Users and Photo, table Photo has a column UserId that links to the Users table. A one to many relationship exists between ...
Hi,
I've got a list of objects in an MVC view, each with a set of submit buttons - Move up, Move down and Remove.
Using the answer from this question, I can get the button clicked - but I need to know which item it would be operating on.
The problem comes from the fact the input's value attribute is passed back, I need more informatio...
I have a MVC site with AD authorization. This is all working fine. I publish the site to the webserver and call the site directly (http://intranet). If I have not logged in for a while (I have an authorised cookie with a 30 minute TTL), I am prompted to log-in and if successful I am redirected to the homeController's index view. This...
I'm using MVC2 with VS2010
I have a view that has two partial views in it: "Login" and "Register"
both partial views contains the Email address field i use the following in both partial views:
<%: Html.TextBoxFor(model => model.EmailAddress ) %><br /><%: Html.ValidationMessageFor(model => model.EmailAddress) %>
if i use both partial...