i m developing website in C#.net but my exception message is not displaying in alert box how can i disply my exception in text box in try catch any body pls tell me
umair.sabri
-2
Light Poster
Recommended Answers
Jump to Posttry { int i = 0; int j = 1; int k = j / i; } catch (Exception ex) { ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + ex.Message.ToString() + "');", true); }
hope that helps
Jump to PostRead this MSDN page - http://msdn.microsoft.com/en-us/library/aa479011.aspx
All 8 Replies
MARKAND911
-1
Junior Poster
JamesLogan
-1
Newbie Poster
Rajmendra
0
Newbie Poster
Rajmendra
0
Newbie Poster
umair.sabri
-2
Light Poster
dnanetwork
18
Practically a Master Poster
Banned
umair.sabri
-2
Light Poster
kvprajapati
1,826
Posting Genius
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.