Example #1
0
 protected void buttonTestConnection_Click(object sender, EventArgs e)
 {
     if (ConnectionStringManager.IsConnectionStringOk(connectionString))
     {
         labelMessage.Text            = "Connection passed. Click the Create Database button to create database.";
         labelMessage.ForeColor       = System.Drawing.Color.Green;
         buttonCreateDatabase.Enabled = true;
         pnlDbName.Visible            = true;
         txtDbName.ReadOnly           = false;
     }
     else
     {
         labelMessage.Text            = "Connection failed. Please provide a appropriate info to connect with database.";
         labelMessage.ForeColor       = System.Drawing.Color.Red;
         buttonCreateDatabase.Enabled = false;
         buttonInstall.Enabled        = false;
         pnlDbName.Visible            = false;
     }
 }