MVC3 Archives - Page 2 of 3 - All Things DotNetAll Things DotNet
  • Subscribe to this RSS feed
  • Receive updates as soon as they are posted.

MVC3 Category

March 8 , 2013 | | In: MVC3

TextBox vs TextBoxFor in MVC

Using the textbox HTML Helper (HTML.TextBox), what you have is a late-bound object which is populated basically first with the name or id of the textbox on the page. The second parameter (although there are other overloads) is the class object. For instance: Html.Textbox(“CustomerName”, Model.CustomerName) It works the same in both ASP.Net and Razor syntax. […]

March 8 , 2013 | | In: JQuery, MVC3

MVC/Jquery – Characters Left in TextAreaFor

Everyone has seen this before – you are typing away in a TextArea (inside a form) and there’s a little message telling you how many characters you have left before the maximum. It turns out that, using Jquery in MVC, that functionality is very easy to implement.

February 22 , 2013 | | In: ASP.Net, MVC3, Visual Studio

Visual Studio – Page Inspector

I just saw a demo on the Page Inspector inside Visual Studio 2012. This is amazing. When you get a chance check it out. Just right click on the page and view in Page Inspector. You get an ‘F12 Tools’-like interface in which you can check and change CSS and find out whether it’s in […]

If you’re getting the error in the subject line, and it seemed to come out of the blue, there might be a very easy fix to this.

February 4 , 2013 | | In: MVC3, Sharepoint 2010

MVC Webgrid – Format Date Column

As we all know, from developing Web Forms, using a Gridview, when we access a database and retrieve a Date column, sometimes (for me, most of the time) the string we get back isn’t very pretty. It normally has the time included, etc. Of course, for the Gridview, all we had to do was go […]

February 4 , 2013 | | In: C#, MVC3

Show Webgrid in View Only if Populated

I came across a situation in which I needed the MVC Webgrid on my page, but only after I retrieved the criteria to do a search. Having a LIST in my model for the data to populate the grid, if I put the webgrid in the View, when the View loaded, it threw an error […]

January 29 , 2013 | | In: MVC3

Debugging MVC 3 – ‘The resource cannot be found’

OK – let’s say you have your new MVC 3 project loaded in Visual Studio. The focus is on your cshtml or vbhtml page, and you presss F5 or click the Debug arrow. You get really ticked off, because the web page that comes up, gripes at you and tells you: “The resource cannot be […]

January 7 , 2013 | | In: ASP.Net, MVC3

MVC and HTML Version in Visual Studio 2010

Let’s say you’ve created a new MVC 3 application, and here and there, within your HTML, you are given messages that <whatever tag or attribute> isn’t supported within the XHTML 1.0 Transitional validation target.

This would probably be most effective inside an MVC application because in Web Forms, you can do this easily by changing the attributes on the controls themselves, though, even still, this would be more efficient. Here’s the scenario. You want to create a function for each and every textbox on your page, so that, when […]

January 7 , 2013 | | In: ASP.Net, ASP.Net Tips, JQuery, MVC3

Change CSS Attributes with JQuery

You can easily use JQuery to change the CSS of HTML tags. Of course, you can either change them inside a function, or outside a function, inside the Script Tag. Here’s a way inside an ‘onblur’ function: $(“#MyTextBox).blur(function () { $(this).css(“background-color”, “red”); } All you’d need to do inside a Script Tag (which would make […]



All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF


If you find this site helpful,
please donate to help keep it online and free





Code 'n' Sprox   DreamTemplate - Web Templates

Follow us on Twitter

Follow AllThingsDotNet on Twitter


Test - The Name: 6936