protected void btnConnect_Click(object sender, EventArgs e)
{
try
{
dbquery.getconnection(txtsname.Text, txtuname.Text, txtpwd.Text);
pnlDB.Visible = true;
pnlCN.Visible = true; ddlDB();
}
catch (Exception ex)
{
lblex.Visible = true; string p = ex.Message.ToString();
Response.Write("<script language='javascript'>alert(" + p + ")</script>");
lblex.Text = p;
pnlDB.Visible = false; pnlCN.Visible = true; }
}
I tried to connect server ..its not correct info it want to show error msg in alert box serverside
How to show the catch error in alertbox in server side