Overview of C# 3.0 Object Initializers

When you create object of any type in C#, it is very common to call its default constructor using new keyword and then set the object properties one by one. The new object initializer syntax introduced in C# 3.0 makes it easier for us to initialize our objects in one statement without calling the object parameterize constructor. In this tutorial I will give you an overview of this new Object Initializer feature of C# 3.0.

Read Full Tutorial

ASP.NET AJAX TextBox Watermark Control

ASP.NET AJAX TextBox Watermark Extender control can be attached to an ASP.NET TextBox control to make it work as watermark TextBox. If TextBox is empty, it will display a message to the user with a custom CSS style. It user will type something in the TextBox that initial message will disappear. The main purpose of TextBox is to provide extra information to the user about the data required in the TextBox. In this tutorial I will show you how you can use ASP.NET AJAX TextBox Watermark Control in your ASP.NET Projects.

ASP.NET AJAX TextBox Watermark Control

Read Full Tutorial

Understanding C# 3.0 Extension Methods

As you know, once a type such as class, interface, and structure is defined and compiled into a .NET assembly, it is not possible to add new members or update existing members without opening and changing the source code and recompiling it again. In C# 3.0, Microsoft introduced a new feature called Extension Methods that enable developers to add new functionality to existing precompiled types. These types can be either .NET Framework built in types such as String and DateTime or they can be your custom types. In this tutorial I will try to give you a complete overview of extension methods.

Understanding C# 3.0 Extension Methods

Read Full Tutorial

Insert Records using ObjectDataSource Control

The ObjectDataSource control enables you to bind Databound controls such as the GridView, FormView or DetailsView controls to a custom .NET component. Normally, these custom .NET components are available in Business Login Layer or Data Access Layer and they perform all basic operations such as Insert, Update, Delete or Selecting Data from the backend Data Source. In this tutorial I will show you how you can use ObjectDataSource control to insert data in Database. I will also show you how you can pass custom .NET objects as parameters and how you can handle exceptions while inserting data in Database.

Insert Records using ObjectDataSource Control

Read Full Tutorial

Using ASP.NET AJAX Popup Control Extender

ASP.NET AJAX Popup Control can be attached to any ASP.NET control to display additional contents in a popup window. The popup window can display either static contents just like tool tips or can be made more interactive with the help of AJAX UpdatePanel control. It can also have other ASP.NET controls inside which may or may not cause full or AJAX based asynchronous post backs using AJAX UpdatePanel. In this tutorial I will show you how you can use AJAX Popup Control Extender with server side ASP.NET controls.

Using ASP.NET AJAX Popup Control Extender

Read Full Tutorial

Understanding ASP.NET ObjectDataSource Control

The ObjectDataSource control allows you to bind your data bound controls to custom .NET business objects Using ObjectDataSource control, accessing and displaying data from a Business Login Layer can be accomplished without writing a single line of code. In this tutorial I will show you how you can use ObjectDataSource control to call methods from custom business objects and how you can bind ObjectDataSource control with ASP.NET data bound controls such as GridView.

Understanding ASP.NET ObjectDataSource Control

Read Full Tutorial

Using Parameters with ObjectDataSource Control

In one of my earlier tutorial I have shown you how you can call methods from custom .NET objects available in your Business Login Layer. In this tutorial, I will show you how to invoke methods which are expecting input parameters from the web form to perform their job. I will also illustrate how to pass values for these input parameters using ObjectDataSource control parameter collections.

Using Parameters with ObjectDataSource Control

Read Full Tutorial