Asp Net Error Message Box
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About how to show error message in asp net Us Learn more about Stack Overflow the company Business Learn more about hiring asp net message box from code behind developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join
Message Box In C# Asp Net
the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to display an error
Asp Net Messagebox
message box in a web application asp.net c# up vote 7 down vote favorite 2 I have an ASP.NET web application, and I wanted to know how I could display an error message box when an exception is thrown. For example, try { do something } catch { messagebox.write("error"); //[This isn't the correct syntax, just what I want to achieve] } [The message box shows the asp net messagebox vb error] Thank you c# asp.net web-applications messagebox share|improve this question edited Mar 16 '09 at 18:46 asked Mar 16 '09 at 18:22 zohair 97692137 add a comment| 8 Answers 8 active oldest votes up vote 11 down vote accepted You can't reasonably display a message box either on the client's computer or the server. For the client's computer, you'll want to redirect to an error page with an appropriate error message, perhaps including the exception message and stack trace if you want. On the server, you'll probably want to do some logging, either to the event log or to a log file. try { .... } catch (Exception ex) { this.Session["exceptionMessage"] = ex.Message; Response.Redirect( "ErrorDisplay.aspx" ); log.Write( ex.Message + ex.StackTrace ); } Note that the "log" above would have to be implemented by you, perhaps using log4net or some other logging utility. share|improve this answer edited Mar 16 '09 at 18:49 answered Mar 16 '09 at 18:25 tvanfosson 350k65567700 Upvoted for saying what I was trying to say. –Bobby Cannon Mar 16 '09 at 18:28 @tvanfosson - It is not that they cannot display message box on server side or cl
Tips/Tricks Top Articles Beginner Articles Technical Blogs Posting/Update Guidelines Article Help Forum Article Competition Submit an article or tip Post your Blog http://www.codeproject.com/Questions/606266/HOWplusTOplusDISPLAYplusMESSAGEBOXplusINplusASP-NE quick answersQ&A Ask a Question View Unanswered Questions View All Questions... C# https://msdn.microsoft.com/en-us/library/994a1482.aspx questions Linux questions ASP.NET questions SQL questions VB.NET questions discussionsforums All Message Boards... Application Lifecycle> Running a Business Sales / Marketing Collaboration / Beta Testing Work Issues Design and Architecture ASP.NET JavaScript C / C++ / MFC> ATL / WTL / STL Managed C++/CLI C# asp net Free Tools Objective-C and Swift Database Hardware & Devices> System Admin Hosting and Servers Java .NET Framework Android iOS Mobile SharePoint Silverlight / WPF Visual Basic Web Development Site Bugs / Suggestions Spam and Abuse Watch features Competitions News The Insider Newsletter The Daily Build Newsletter Newsletter archive Surveys Product Showcase Research Library CodeProject Stuff communitylounge asp net message Who's Who Most Valuable Professionals The Lounge The Insider News The Weird & The Wonderful The Soapbox Press Releases Non-English Language > General Indian Topics General Chinese Topics help What is 'CodeProject'? General FAQ Ask a Question Bugs and Suggestions Article Help Forum Site Map Advertise with us About our Advertising Employment Opportunities About Us Ask a Question All Questions All Unanswered FAQ HOW TO DISPLAY MESSAGEBOX IN ASP.NET USING C# (PLEASE HELP) but messagebox.show conduct the error why? Rate this: Please Sign up or sign in to vote. See more: ASP.NET in the namespace not have messagebox.show Posted 13-Jun-13 1:47am suganya M110 Add a Solution 3 solutions Top Rated Most Recent Rate this: Please Sign up or sign in to vote. Solution 1 Accept Solution Reject Solution Nup, using messagebox.show in Asp.net is a bad idea. you can use javascript to do the same. http://www.w3schools.com/js/js_popup.asp[^] http://dhtmlx.com/docs/products/dhtmlxMessage/index.shtml[^] If you want to show messagebox from code behind then you can use ScriptManager Class[^] to register javascript with pa