?
Solved

Confirmation Box Handling in ASP.NET

Posted on 2003-03-17
4
Medium Priority
?
309 Views
Last Modified: 2010-04-15

I have been having difficulty developing a nice implementation of a confirmation box for an ASP.NET application.  My latest attempt is to have my ASP.NET code register a JavaScript to handle the confirmation box.  This works fine, but so far I have been unable to find a clever way of returning the user's response to the confirmation box to the ASP.NET code.

I found an example that uses JavaScript's __doPostBack method to generate the postback I need to capture.  However, I am not familiar with this procedure.  Ideally, I'd like to use it to generate a specific postback for a control event (like a hidden button press).  This would give me all the knowledge I would need from the confirmation box script to reat properly to the user's response.


I assume this is a common hurdle in server-side web apps.  Surely there must be a simple trick to achieve what is necessary.


Please let me know if you're familiar with this __doPostBack trick or if there is some other method to communicate the result of the JavaScript confirm box back to the server-side code.

0
Comment
Question by:bschneid41
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 4

Accepted Solution

by:
MrGhost earned 252 total points
ID: 8157654
The only way to do this is like on the client side, for example if you are handling some delete confermation acction you have to do it on the client side with javascript end if user doesn't wants do delete the record or whatever you just return false so that you abort postback, or if user confirms deletion you return true and you receive postback so that ypou can handle deletion!
0
 
LVL 22

Assisted Solution

by:Mohammed Nasman
Mohammed Nasman earned 248 total points
ID: 8158177
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question