Tuesday, March 8, 2011

Referring to Connection String in Web.Config

When instantiating the SqlConnection object:


MyConnString = ConfigurationManager.ConnectionStrings("TheConnectionString").ConnectionString


Where "TheConnectionString" is the name of the connection string in Web.Config.


"SqlConnection Class (System.Data.SqlClient)" ( http://bit.ly/J5ew4y )

Monday, March 7, 2011

Detect Browser (Server side)

"How to determine browser type in server-side code without the BrowserType object in ASP.NET" ( http://bit.ly/hAAFXl )

lblUserAgent.Text = Request.Browser.Browser & " " & Request.Browser.Version

Saturday, March 5, 2011

Casting

"Cheat Sheet - Casting in VB.NET and C# - CodeProject" ( http://bit.ly/eNDEgR )

Wednesday, March 2, 2011

Server.Transfer Vs. Response.Redirect

STOP THE PRESS

"Server.Transfer Vs. Response.Redirect - Developer.com" ( http://bit.ly/e43UFS )
 &
"Server.Transfer vs. Response.Redirect" ( http://bit.ly/h5uxCo )

Tuesday, March 1, 2011

Javascript comments

Javascript single line comment
//

Javascript multi-line comment
/*
This is a
multi line comment
*/

StringBuilder Class

"StringBuilder Class (System.Text)" ( http://bit.ly/iidbFf )

EG:
"Iterate Through The Form Collection In ASP.NET 2.0 - Robert Robbins" ( http://bit.ly/gOFBQ0 )

Status codes in HTTP

"Status codes in HTTP" ( http://bit.ly/fgcm4q )