How Tos



Convert an object to XML string

Posted on: 11/10/2008

In this article we will show you how to output an object's data to an XML string.


Manually initialize a custom membership provider

Posted on: 5/08/2008

In this article, we will describe how to manually initialize a custom membership provider.


Check a null value in a column of a DataTable in a DataSet

Posted on: 2/06/2008

This article will show some ways of checking for null values in a DataTable.


Create and populate a DataTable manually

Posted on: 1/29/2008

This article will demonstrate how to create a DataTable manually and populate it with some random data.


Easily take your ASP.NET 2.0 web application offline for maintenance updates

Posted on: 12/06/2007

This article describe how to easily take your ASP.NET 2.0 web application offline.


Separate your connectionStrings and appSettings configuration settings into external configuration files

Posted on: 12/04/2007

In this article, we will describe how to separate your connection strings and appSettings into external files from your web.config or app.config.


Get the the client's computer name that is consuming a web service

Posted on: 11/28/2007

This article will show you how to get the client's computer name that is calling your web service.


Overcome the 32k limitation of the event log

Posted on: 11/26/2007

This article will show you one way of overcoming the 32k character limitation of the event log. The sample code in this article can also be easily retrofitted to used the enterprise library.


Divide a number and round it up

Posted on: 11/26/2007

This article will demonstrate how to divide an integer number and round it up.


Configure the Enterprise Library 3.1 Logging Application Block to log the local server time

Posted on: 11/21/2007

The Enterprise Library Logging Application Block by default will log the timestamp in UTC time. In the Enterprise Library ver 3.0 and earlier, if you wanted it log the local server time, you can override the FormatToken method and implement you you custom logic. If you use the Enterprise Library 3.1, this is a very easy change which we will describe in this article.


Remove all HTML tags from a string using regular expressions

Posted on: 11/15/2007

This article will show you how to remove all HTML tags from a string using regular expressions.


Add a row count column to a GridView, DataList or Repeater

Posted on: 9/07/2007

This article will show you how to add a row count column to a GridView. This technique can also be applied to a DataList or a Repeater.


Convert an Array of Objects to a Generics List

Posted on: 8/15/2007

This article will show you how to convert an array of object to a generic list.


Implement Microsoft Enterprise Library 3.x Logging

Posted on: 8/03/2007

This article will show you how to write to the eventlog using Microsoft Enterprise Library 3.x Logging block.


Maintain the position of the scrollbar on postbacks

Posted on: 8/01/2007

Don't you hate when you PostBack on a long form you have to scroll back to the location where you were previously? In this article, it will show you how to maintain the scroll position on a PostBack.


Execute an Oracle Stored Procedure in an Oracle Package and retrieve a ref cursor's results into a DataSet

Posted on: 7/26/2007

This article shows you how to execute an Oracle stored procedure in an Oracle Package using the Oracle .NET data provider shipped with the .NET Framework. It will also show you how to retrieve an output ref cursor's results and load it into a DataSet.


Get the ConnectionString from the Web.Config in ASP.NET 2.0

Posted on: 7/26/2007


Execute an Oracle Package and retrieve an output cursor using Enterprise Library DAAB 2.0

Posted on: 7/26/2007

This article will show you how to execute an Oracle Package and retrieve an output cursor's data using Microsoft Enterprise Library Data Access Application Block(DAAB) 2.0.


Implement Microsoft Enterprise Library 2.0 Data Access Application Block ( DAAB ) in 4 Easy Steps

Posted on: 7/18/2007

This article will show you step by step on how to implement the Enterprise Library 2.0 Data Access Application Block in to your application.


Execute JavaScript during one of the AJAX request events

Posted on: 5/23/2007

The following article will demonstrate how to execute a JavaScript function at the end of an Ajax request.


Parse a QueryString into a NameValueCollection object

Posted on: 5/23/2007

In this article, we will parse a QueryString manually and place the key/values into a NameValueCollection object.


Register a httpHandler in a web project that does not compile to a single output assembly (ASP.NET 2.0)

Posted on: 5/23/2007

When you compile in ASP.NET 2.0, the code is no longer compiled into one assembly. This could be a problem when trying to configure a httpHandler in the web.config. This article will show you how to register a httpHandler correctly in the web.config.


Register JavaScript in a page (ASP.NET 2.0)

Posted on: 5/17/2007

This article describe how to register JavaScript in an ASP.NET 2.0 page. It will also describe the difference between RegisterClientScriptBlock and RegisterStartupScript methods.


Register Javascript in an ASP.NET AJAX UpdatePanel

Posted on: 5/17/2007

Registering a piece of JavaScript in an ASP.NET AJAX UpdatePanel is different than registering JavaScript for a page. This article will show you how to this correctly.


Convert a QueryString into a NameValueCollection (ASP.NET 2.0)

Posted on: 5/16/2007

This article demonstrates how to convert a QueryString into a NameValueCollection object.


Split a delimited string

Posted on: 5/15/2007

This article shows how to split a delimited string into an array


Recursively loop through InnerExceptions in the Application_Error event of the Global.asax

Posted on: 5/03/2007

This article will show you how to recursively loop through InnerExceptions to build an exception string message ready to be logged.


Consume an RSS feed

Posted on: 4/27/2007

This article will show you how to consume an RSS feed.


Randomize the order of the DataRows in a DataTable

Posted on: 4/27/2007

This article will show you a way to randomize the order of the datarows in a datatable.


Programmatically select an item in a DropDownList

Posted on: 4/27/2007

This article shows you how to programmatically select an item in a DropDownList


Access Master Page's properties and methods in the ASPX and ASCX codebehind (ASP.NET 2.0)

Posted on: 4/25/2007

This article describes how to access Master Page's properties and methods in your webform and usercontrol's codebehind (ASP.NET 2.0)


Delete a cookie

Posted on: 4/24/2007

This article demonstrate how to delete a cookie


Set a cookie value

Posted on: 4/23/2007

This article demonstrates how to set a cookie value


Retrieve a cookie value

Posted on: 4/23/2007

This article demonstrates how to retrieve a cookie value


Return X number of rows from a DataView (ASP.NET 2.0)

Posted on: 4/17/2007

One way to return X number of rows from a DataView


Retrieve AppSetting value from the web.config (ASP.NET 2.0)

Posted on: 4/14/2007


Make asynchronous ASP.NET 2.0 webpages

Posted on: 4/13/2007


Register UserControls and Server Controls in Web.Config (ASP.NET 2.0)

Posted on: 4/13/2007

In ASP.NET 2.0 you can now register all your UserControls in the Web.config.


Programmatically add a link tag in between the HTML head tag (ASP.NET 2.0)

Posted on: 3/17/2007

This code demostrates how to programmatically add a link tags in between the tag


Calculate a week starting monday

Posted on: 3/17/2007

Calculate a week starting monday