New way of creating web applications on Visual Studio 2013

Yesterday Visual Studio 2013 CTP was released and now it’s time to play with it. First thing I noticed was the new way how to create web applications. For all web applications there is generic dialog where you can set all important options for your new web application before it is created. Let’s see how it works. Also let’s take a look at new blue theme of Visual Studio 2013.

Read more

Better solution for ASP.NET MVC checkbox list

Couple of years ago I worked out my first solution for checkbox list in ASP.NET MVC. Today I got some markable simplifications done and my solution is close to state where some nice-to-have tweaks can be done to add more automatics to controller side but solution is also good enough how it is like now. Let’s see how to get checkbox list functionality done with couple of simple steps.

Read more

ASP.NET MVC–How to show asterisk after required field label

Usually we have some required fields on our forms and it would be nice if ASP.NET MVC views can detect those fields automatically and display nice red asterisk after field label. As this functionality is not built in I built my own solution based on data annotations. In this posting I will show you how to show red asterisk after label of required fields.

Read more

ASP.NET MVC: Helper method to display date ranges

I have events web site where I want to show events start and end time to visitors. I wrote simple extension method called DisplayTimeRange() to display event time range on user-friendly manner. My goal is to show times as 01.01.2012 10:00 – 14:00 and 01.01.2012 15:00 – 01.03.2012 18:00. It’s practically displaying time ranges is shortest possible way. In this posting I will show you how to do it using extension method.

Read more

Deploying independent web applications to Windows Azure using single web role

I found very good blog post by Andy Cross’ Blog where he describes how to deploy multiple web sites in a single Windows Azure web role. I like the idea but there are some things that should be understood and done differently if you plan to use same web role for totally different web applications that you want to run on your Windows Azure instance. In this posting I will show you how to deploy independent web applications to Windows Azure instance using single web role.

Read more

ASP.NET 4.5 Preview: Using model binding to display data

ASP.NET Forms 4.5 Preview introduces us model binding for web forms. Web developers who are familiar with ASP.NET MVC already know what model binding is and how powerful it is. Model binding means framework ability to construct objects of known types using values from presentation layer. In this posting I will show you how to use model binding with ASP.NET Forms 4.5.

Read more