Comments on database connection method

Dec 22 2009 5:45 AM

Hi there,
I was wondering if i could use database connection code in the global.asax like the following. I'm doing my first .net web app currently.
public static DatabaseConnection Connection
{
get
{
string connectionString =
"Initial Catalog = ??????????; Integrated " +
"Security = true; Network Library = ????????; " +
"Packet Size = 4096";
return new DatabaseConnection("Data Source = ????????; " + connectionString);
}
}

Any comments would be much appreciated chaps.

Answers (2)