Author: amodius | Posted on: 7/30/2010 10:19:55 AM | Views : 249

hi there
this is my tipical page
as you can see, i have a connection property and a function who return if the program can connects to DB with any error

public partial class Email : System.Web.UI.Page { SqlConnection Conn = new SqlConnection(); private SqlTransaction trans; protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { if (Connect() == false) { return; } LoadGRW(); Conn.Close(); } } private void LoadGRW() { CLS_EmailParameters ObjEmailPar = new CLS_EmailParameters(Conn); GRW_EmailPar.DataSource = ObjEmailPar.List(); GRW_EmailPar.DataBind(); } private Boolean Connect() { Boolean bRetVal; String sStrConn = ConfigurationManager ...

Go to the complete details ...