X

ASP.NET

ASP.NET MVC 4: Short syntax for script and style bundling

ASP.NET MVC 4 introduces new methods for style and scripts bundling. I found something brilliant there I want to introduce you. In this posting I will show you how easy it is to include whole folder with stylesheets or JavaScripts to your page.

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.

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.

ASP.NET MVC: Simple view to display contents of DataTable

In one of my current projects I have to show reports based on SQL Server views. My code should be not aware of data it shows. It just asks data from view and displays it user. As WebGrid didn’t seem to work with DataTable (at least with no hocus-pocus) I wrote my own very simple view that shows contents of DataTable.

ASP.NET MVC: Converting business objects to select list items

Some of our business classes are used to fill dropdown boxes or select lists. And often you have some base class for all your business classes. In this posting I will show you how to use base business class to write extension method that converts collection of business objects to ASP.NET MVC select list items without writing a lot of code.

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

My last posting about ASP.NET 4.5 introduced how to use strongly typed controls to display data. Using strongly typed presentation layer templates is not the only thing that model binding is good for. From ASP.NET MVC we know how convenient it is when model binders are also able to update our objects when they are modified. In this posting I will show you how to use strongly typed FormView to save data that user modified. (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.

ASP.NET MVC 4: Display modes

One new features of ASP.NET MVC 4 is support for display modes. This means that you can conditionally show different output to different user agents like desktop and mobile browsers. Of course, you can define your own custom rules too. In this posting I will show you how display modes work and explain how to use them in your ASP.NET MVC applications.

ASP.NET MVC 4: New mobile web application template

ASP.NET MVC 4 Developer Preview introduces also new template for mobile web applications. These templates are special because they are using jQuery Mobile – special jQuery library for building mobile user interfaces. In this posting I will show you how new mobile web application template looks like.

ASP.NET MVC 4: New template for web applications

I’m playing with ASP.NET MVC 4 Developer Preview. There is new default application template available for ASP.NET MVC 4 web applications. New template is modern, has better look than current one and has better support for different screen sizes. In this posting I will show you how new template looks like.