Click here to Skip to main content
15,923,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have to make some error check in my web site.. in such a way tha whenever some one try to delete anything .. The dilogue box appears same as in desktop applications with messagebox.show ... with yes or no. how to do it in desktop application.
Posted
Comments
Sergey Alexandrovich Kryukov 7-Feb-12 14:08pm    
Not clear. Tagged "ASP.NET", question is about "desktop application". What's the problem with error checks. Do you know exception handling well enough? Again, what's the problem? You cannot ask such vague questions.
--SA
Christian Graus 7-Feb-12 14:10pm    
He means, how do I do it LIKE a desktop app

Assuming you mean the dialog to appear in your client browser, (since you already know about MessageBox.Show for desktop applications), you are looking to use a Javascript Confirm box: http://www.w3schools.com/js/js_popup.asp[^]

There is an example of exactly what you are trying to do here: Adding Client-Side Confirmation When Deleting (C#)[^]
 
Share this answer
 
You can create web forms for prompts like this, I use jquery and then a jquery add on library to do exactly that. The correct answer is, you need to show some sort of html control that prompts the user, if it looks like a popup, or not ( typically nowadays, it's part of the main page and javascript is used to make it look like a popup window )
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900