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.
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.
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.
You’ve probably wondered, along the way using MVC, what the advantages or differences are between the Editorfor HTML Helper and the TextBoxFor HTML Helper.
As a web designer, somewhere along the way, you have come to a site with a TextArea, and even though it notes the maximum number of characters for the textbox you’re about to type in, you never really know how many characters are left as you type, because there’s nothing visual showing you. I’ve used […]
Recently, I had a problem that only occurred when I debugged my application through Visual Studio. One and only one (out of dozens) of variables became ‘stuck’, if you will. I always got the error message that the variable was undefined. The error remained even when I completely removed the variable and named it something […]
The scenario is this: You have an MVC application which uses the JQuery UI Tabs implementation. Everything is fine until you make a server postback with MVC. The ‘Selected Tab’ resets to zero (the first tab). Have no fear. The solution is not hard at all.
Let’s say you’re adding some newer CSS changes to your site and for some reason, they work fine in Chrome or Firefox, but not showing up like they should in IE10.
We’ve all experienced it – we’ve populated a listbox and there are blank items. Of course, the best way to fix this is to fix the data. However, let’s say you have a deadline and need to get rid of those blank items first.
if you’re running Visual Studio (for me, it was 2010), and you start debugging your ASP.Net site, and you get the error in the subject line (with your specifics where the dots are), it can be a harrowing experience trying to find the solution.
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF