Shortcuts



No more hard coding the physical path to your access database in the ConnectionString section of your web.config

Posted on: 6/16/2008

If your database is located in the App_Data folder of your web application. Here is a neat little shortcut for your Access Database ConnectionString.


Use the @ Symbol instead of escaping slashes

Posted on: 1/29/2008

We all had to at one point or another modify a file path and escape the slashes before pasting it into our code or into a database table. Using the @ symbol in front of the string will eliminate the need to modify the path.


Configure Simple Mail Transport Protocol (SMTP) settings in web.config

Posted on: 11/19/2007

Does your ASP.NET 2.0 application sends email, here is a shortcut to configure the SMTP settings in the web.config.


Writing a condition statement on one line in VB.NET

Posted on: 8/01/2007

A shortcut way of writing a condition statement in VB.NET


Set a default button on your ASP.NET 2.0 web forms

Posted on: 7/23/2007

In the pass, we used to write Javascript to allow hitting the Enter key to submit a form. Now in ASP.NET 2.0, Microsoft have introduced a simple way to set the default button.


Parsing dates (ASP.NET 2.0)

Posted on: 5/28/2007

Parsing text strings into dates is even more easier in ASP.NET 2.0.


Explicitly set a control property to read a value from a local or global resource file (ASP.NET 2.0)

Posted on: 4/24/2007

Here is a quick way in the ASPX file to set a control property to read from the resource file.


Register a Master Page in the Web.config (ASP.NET 2.0)

Posted on: 4/17/2007

An easy and clean way to apply one master page to an entire site is by adding the master page reference in the Web.config.


Test for null or empty string (ASP.NET 2.0)

Posted on: 4/11/2007

Shortcut to test for null or empty string in ASP.NET 2.0


Conditional (Ternary) Operator in C#

Posted on: 3/17/2007

Conditional (Ternary) Operator (?:) in C#


Coalesce Operator in C#

Posted on: 3/17/2007

Coalesce Operator(??) in C#