MVC Archives - All Things DotNetAll Things DotNet
  • Subscribe to this RSS feed
  • Receive updates as soon as they are posted.

MVC Category

Let’s say your’re trying to run your MVC application in Visual Studio, but you get the error in the subject line whether you run it with our without debugging. If you search for a solution to the problem, just about all you’ll see over and over is to set your Web project as the ‘Startup […]

May 26 , 2015 | | In: ASP.Net, MVC

IISExpress VERY Slow Loading

In the output window, I started getting notices for every dll in the references like: “‘iisexpress.exe’ (Managed (v4.0.30319)): Loaded ‘C:\Windows\Microsoft.Net\assembly\GAC_32\” among all kinds of notices – literally a website that took normally a few second to load during debugging sometimes took minutes or didn’t load at all.

March 19 , 2015 | | In: ASP.Net, MVC

Using HTML Tags in ViewBag

If you have html line breaks, links or other HTML tags that you’d like to use in a ViewBag, it’s not as hard as it seems. At first I tried Html.Encode/Decode, but that didn’t work. It seemed like the things I tried just kept adding to a list of items that proved you couldn’t do […]

January 6 , 2015 | | In: ASP.Net Tips, MVC

Prefill Textboxes with Decimal Format

Let’s say you’re getting data from a database, and some of the data is null (maybe it’s an integer). A very common approach is to iterate through a table: dtEmployees = emp.Get(sqlGetEmployees); foreach (DataRow drEmp in dtEmployees.Rows) … ptt.Fieldname = drEmp[“Fieldname”] != DBNull.Value ? int.Parse(drEmp[“Fieldname”].ToString()) :0; That will populate the page with a ‘0’ for […]

January 2 , 2014 | | In: ASP.Net, MVC, MVC3

Introduction to the WebGrid in MVC

In WebForms, first we had a DataGrid and then the GridView that we relied on for our grid type presentations. Well, once we started using MVC, it was a little more difficult since there are no ‘controls’ per se.

October 12 , 2013 | | In: ASP.Net, ASP.Net Tips, JQuery, MVC

Javascript Library Not Loading

Have you ever had a script tag in your code like this?: <script type=”text/javascript” src=”@Url.Content(“~/Scripts/myJavascriptLibrary.js”)” /> What’s more, did you find that it was not actually loading when the page ran?

September 2 , 2013 | | In: ASP.Net Tips, MVC, MVC3

Customized Required Message in MVC

Everyone using MVC generally knows about the ‘Required’ attribute for properties in the model. It’s surrounded by square brackets and placed just above the property. However, what if you want to change the displayed message to more user-friendly text? Well, it turns out that it’s very easy.

June 5 , 2013 | | In: MVC, MVC3

TextBoxFor – Default to Current Date (Razor)

Let’s say you have a TextBoxFor in your page to display a date (based on DateTime in the model): @Html.TextBoxFor(model => model.dateFrom) But, since it just displays something like “1/1/0001 12:00:00 AM“, you probably don’t like that.



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