This question could be posted on ServerFault as well, however there is definitely a coding element involved due to the rewrite rules in my web.config. This is why the question does indeed have a home on SO.
I've recently deployed a website to a new server and have discovered that trying to access my site via www.example.com returns a 4...
On a skeleton ASP.MVC that Visual Studio creates, I add a script tag to my head section in Site.Master:
<script src="~/Scripts/jquery-1.3.2.js" type="text/javascript"></script>
This causes the page to not render. In my case, I had a custom controllerfactory and the base method GetControllerInstance threw an exception:
The control...
Hello, I'm starting to TDD and I want to know if it is a bad practice to add a service reference to test my project or if I just mock a fake service on my tests that depends of the WCF service.
...
I have an Html.Actionlink to which I am trying to add a "class" and an ActiveClass.
<%= Html.ActionLink("Home", "Home", "Account", null,
new {@class ="some-class"},
Html.RenderLinkClassIfActive("Home", "Account", "active")) %>
However, this doesn't work. What can I differently to make this work?
...
I'm using the PagedList class in my web application that many of you might be familiar with if you have been doing anything with ASP.NET MVC and LINQ to SQL. It has been blogged about by Rob Conery, and a similar incarnation was included in things like Nerd Dinner, etc. It works great, but my DBA has raised concerns about potential fut...
In Visual Studio 2008 after I add the Feb 2010 SharePoint extensions, I see project templates for Workflow (eg., State Machine Workflow Library) and under C#/Web a project for ASP.NET MVC Web Application.
If I'd like to do a State Machine WorkFlow using MVC which should I choose and which additional modifications do I need to do ?
(I'm...
I am trying to use link to submit a form using the following code:
function deleteItem(formId) {
// submit the form
$("#" + formId).submit();
}
Basically I have a grid and it displays a number of items. Each row has a delete button which deletes the item. I then fire the following function to remove ...
So here is the scenario. I have an internationalized application using .NET MVC in English and French using the global resources.
For certain clients using the application, the terminology used to reference an object such as "User" is different. One client might see that User as a "Subscriber" but another client's mental model of the U...
I am attempting to force the domain name to not use the 'www'. I want to redirect the user if attempted. I have seen very little on an MVC solution. Is there anyway to harness the routing built into MVC, or what the best solutions is.
Thanks
...
Ok, I have a ViewModel that looks like this:
public class UserLogin
{
[Required]
public string EmailAddress { get; set; }
[Required]
public string Password { get; set; }
}
My controller looks like this:
[HttpPost]
public ActionResult LogIn(UserLogin model)
{
if (!ModelState.IsValid)
{
// ...
}
}
...
I've already created MVC project (VS2008 .NET 3.5)
at first time VS2008 ask me
"Would you like to create Unit text project for this application ?"
I choose No..
Now I realize that it's growing more complex and test driven development is better.
but can't findout how to add a unit test project in my solution?
...
Hi!
I've been wondering about best practices on creating a project in MVC, and let others create extension/modules/plugins and skins/themes etc, for it.
For example WordPress is great at this. Just upload a file or folder. Or even browse the plugins directly from your WP administration and install by a simple click.
Does anybody here...
I'm really not sure how to ask this, so forgive me if it sounds a bit off.
I have an IPerson interface, a Student : IPerson class and an Employee : IPerson in the Project.Data namespace.
In my controller, I add the reference for Project.Data and Project.Services and add using statements where appropriate.
In my view, I create a strong...
It seems I cannot upgrade my ASP.NET MVC v1 project to be able to open it in Visual Studio 2010. Anyone noticed that already?
"The project type is not supported by this installation."
??
edit...I actually want to upgrade it to ASP.NET MVC v2 if possible. If not, I will probably create a new ASP.NET MVC v2 project and copy the files th...
I am trying to add facebook connect into my ASP.NET MVC I followed all the directions on how to do this, however it isn't working right for some reason.
In IE the window that prompts you to login is blank but in Firefox or Safari it works fine.. anyone have any insight to this problem?
...
I would like to redirect to another page within an action method when for instance a certain exception occurs or authorization fails. This is not a problem with normal requests, however when the request is made via Ajax, redirection fails.
Many folks out there seem to suggest that I should send back a JavaScriptResult and change the doc...
How could I implement a Comet architecture in a ASP.Net MVC?
...
how to check in View if validation succeded (same as ModelState in Controler)?
...
Hi,
New to MVC here, I would like to have the login box working in a jquery dialog across the site by placing it on the master page.
I have wrapped the logOn.aspx form with a dialog div and added a button to open the dialog and some jq
<button id="show-sign-in">Sign In</button>
<script type="text/javascript">
$(function () {
$("#di...
Has anyone ever been successful at getting the SimpleModel jquery pluggin to work in asp.net mvc? If so how did you implement it, I can't seem to get the dialog to even display.
...