The formatting of a DataGrid cell’s string content can be configured using the .NET String.Format() method. Variations on the usual layout are given dependant upon whether the column is a bound column or a template column. For string formatting the method is String.Format(formatString, string). For example to show a today’s date in short data format, […]
Category: VB.NET
FileExists Testing if a File Exists
In VB.NET testing whether a file exists with fileexists. fileexists is a part system.IO namespace. It can be used to test whether a file exists. The following code tests whether a file exists: Imports System.File.IO Dim fs As New IO.FileInfo if fs.fileexists then ‘ File exists – continue with actions end if Checking whether a […]
List of Request.ServerVariables
The ServerVariables are a collection of environment variables and request header information. Information relates to the client and the server. Information available in the ServerVariables includes the server and client IP addresses and the client browser details. Variable Description ALL_HTTP Returns all of the HTTP headers sent by the client. Always prefixed with HTTP_ and […]
Migrating CDONTS e-mail
The implementation of the CDONTs e-mail method used in asp has changed in Windows 2003 server. Example old CDONTS implementation Set m1 = CreateObject(“CDONTS.NewMail”) m1.From = fromAddr m1.To = recipients m1.Subject = subject m1.Body = CStr(“” & body) m1.Send The code below is an example of the new cdo format. Set objErrMail= Server.CreateObject(“CDO.Message”) With objErrMail […]


