There are many new concepts to learn for a typical asp.net webform developer who is happy with their event driven, drag and drop world where the code behind is abstraction enough.
What is the best way to introduce the concept of mvc, unit testing, loose coupling, dependency injection and continuous integration whilst still maintaining e...
I have a MVC website with a complex model.
I'm using xVal to do my validation by decorating my model properties with validation attributtes.
I'm looking for at way to add a StringLengthRule to all properties of type string without manually adding a StringLengthAttributte to all the properties.
One way to go was to make my own IRulesPro...
I think the title is enough :). I have VS 2010 beta1 installed, and I wish to run an asp.net mvc application on my local IIS. The problem is, the asp.net 4.0 runtime is selected by default for all the web sites, when I try to change it to asp.net 2.0, I get the following error message:
I click yes, then ok, and when I get back to the ...
Hello,
I'm trying to create a simple method to turn a name (first name, last name, middle initial) into a public URL-friendly ID (like Stackoverflow does with question titles). Now people could enter all kinds of crazy characters, umlauts etc., is there something in .NET I can use to normalize it to URL-acceptable/english characters or d...
Hi,
I have the following method in one of my Views,
public ActionResult EditRoute(int? id)
{
// Do Work
return View(new RoutingFormViewModel(obj1, obj2, obj3));
}
What I'd like to do is get the RoutingFormViewModel that is being passed to the view in my unit test, is this possible?
I've tried the following but don't seem to ...
So i'm doing a wizard as such located here:
http://stackoverflow.com/questions/297148/how-to-make-a-wizard-with-asp-net-mvc
where each page has its own div but each div is really located on the same page. Now, there are 2 issues...I am new to MVC and wish to do some sort of validation before continuing to the next page. Validation ran...
I know how to setup a route to a url like http://siteurl.com/mycustomaccount/dashboard, but I would like to customize the "url" portion with a custom virtual server path such as http://mycustomaccount.siteurl.com/dashboard.
I want users signing up to have their account "mycustomaccount" setup so that I can intercept the request and prov...
I have a form where users can enter data that ultimately would be used to create new Customer, CreditCard, and Membership objects. I want to add recaptcha to the page. This does it's validation on the server side. All other verification will be done client side with javascript with perhaps an extra layer of validation on the server si...
Hi!
My ASP.NET MVC view is getting "cluttered up" because often times I need to conditionally show things which leads to long inline C# code, including hard to read ternary operator statements such as below (demo purposes only) and similar constructs.
<%= Model.SupportsFeature ? Model.HasName ? "This model supports the feature and ha...
Say I have a route like this:
"{controller}/{action}/{roomId}/{name}"
And a form action like this (And yes it looks like this in the action in the html ie post server processing):
Room/Index/6/SomeThing?pageNumber=1&amountToShow=5
And the form is simple:
<form action = "Room/Index/6/SomeThing?pageNumber=1&amountToShow=5" method="g...
Hello,
I have a bunch of text boxes in my ASP.NET MVC view which are submitted to the server. How could I preserve the current focus so that the user can simply hit enter on any text box or click a submit button, and when the page returns (this is all via GET) the focus is where the user left off?
Thank you!
...
What are Benefits of using ASP.NET MVC Controller Injection (IoC) ?
...
Hello,
I have two applications using ASP.NET MVC, each with multiple controllers.
I want to do a redirect from application A to application B, but only for a single route on application A (one controller).
Eg.
/applicationA/issue/* should redirect to /applicationB/issue/
/applicationA/quality/ should not redirect
The examples for I...
I'm going to re-ask this question in a slightly different way.
Say I have 2 or more of the [same] partial view on the page.
On this PartialView there is a text box and a button.
On the click of the button I need to take the contents of the textbox and do a Json postback, do some stuff and return a result set.
The problem I have is th...
Here's what I mean. In developing my ASP.NET MVC based site, I've managed to offload a great deal of the static file hosting and even some of the "work". Like so:
jQuery for my javascript framework. Instead of hosting it on
my site, I use the Google CDN
Google maps, obviously "offloaded" - no real work being performed on my
server - Go...
Is it possible to figure out the current ViewContext's VirtualPath eg
~/Views/Company/Create.aspx
...
I have implemented a custom membership provider using LINQ to SQL. When I added the Membership provider to my asp.net mvc website in the web config the logon page stopped working.
My Web.config setup:
<membership>
<providers>
<clear/>
<add
name="MyMembershipProvider"
type="MyMembership.MyMembershipProvider"
...
Hello! I'm currently diving into web development after ten years of desktop development and I'm trying to get a high level grasp on the many concepts I'm learning. The two most recent concepts I've been reading up on are MVC (specifically ASP.NET MVC) and AJAX. I understand MVC is a pattern used to separate logic and data and AJAX is ...
I have created a custom entity because I need to populate an entity with some data from a join in L2S.
When I right click on the ActionResult code in the Controller to "Add View", and then choose "Create strongly typed view", my class doesn't show up in the classes available in the selector. I'm not sure why. Here is my code:
//The Mod...
I've created a helper, that I can pass a DateTime object to, and an identifier (string). It would then output three selects showing DD | MM | YYYY (or whichever way you wacky americans want your dates).
I'm adding a common component to the start of each select's Name.
dateselector-day-{identifier}
dateselector-month-{identifier}
date...