Hi
In case of error, I want to show it. I tried two different ways, but none of the two works.
if i do string a = "ok", then both work. Strange, because ex.Message is a string.
Thanks
catch (SqlException ex)
{
string a = ex.Message;
ClientScript.RegisterStartupScript(this.GetType(), "", "alert('Error:' + '" + a + "');", true);
Response.Write("");
}

Sachin SinghRank #66 · 26.2K reputationPosted Jun 26, 2022, 7:05 AM EDT
Rijwan AnsariRank #82 · 24.2K reputationPosted Jun 26, 2022, 10:25 AM EDT
Valerie MeunierRank #1,526 · 1K reputationPosted Jun 26, 2022, 12:35 PM EDT