try
{
SqlConnection con = new SqlConnection(strconn);
con.Open();
SqlCommand cmd = new SqlCommand("InsertPowerPoint",con); // Stored Proc Name
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@PowerPointName",SqlDbType.VarChar).Value = filename;
cmd.Parameters.AddWithValue("@PowerPointPath",SqlDbType.VarChar).Value = pptpath;
cmd.ExecuteNonQuery();
xErr.Text = "Uploaded Successfully"; // If No Error then Uploaded Successfully
xErr.Visible = true;
FillGrid();
}
catch (Exception ex)
{
errdesc = ex.Message;
xErr.Text = errdesc; //any error from SP then It will show in Label after catching the error in exception.
}