473,507 Members | 11,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to show a confirm dialog?

ad
I want user can confirm before delete records ?
How can I show a confirm dialog when users press a button?
Nov 19 '05 #1
3 3811
Here's some server side code that uses javascript to display a confirmation
message.

myDeleteButton.Attributes.Add("onclick", _
"return confirm('Are you sure you want to delete?');")

In this example, the Delete button will post back only if the person
confirms they want to delete. Otherwise your server code is never called in
response to the button click.

Here's a more detailed analysis of your options, including a free control
that can handle many of the options for you.
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:eN**************@TK2MSFTNGP09.phx.gbl...
I want user can confirm before delete records ?
How can I show a confirm dialog when users press a button?

Nov 19 '05 #2
ad
Thank for your immediately answer.
I wnat to show a progress bar dialog after the user press Yes in the confirm
dialog.
The javascript function for Show progress bar dialog is
_ShowProgressWindow();
I do that with the code:
myDeleteButton.Attributes.Add("onclick", "return confirm('Are you sure you
want to delete?');");
myDeleteButton.Attributes.Add("ShowProgressWindow( )");
But it fail to show Progress bar!
How can I add two event handle to one event in javascript?


"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> ¼¶¼g©ó¶l¥ó·s»D
:Oc**************@tk2msftngp13.phx.gbl...
Here's some server side code that uses javascript to display a confirmation message.

myDeleteButton.Attributes.Add("onclick", _
"return confirm('Are you sure you want to delete?');")

In this example, the Delete button will post back only if the person
confirms they want to delete. Otherwise your server code is never called in response to the button click.

Here's a more detailed analysis of your options, including a free control
that can handle many of the options for you.
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:eN**************@TK2MSFTNGP09.phx.gbl...
I want user can confirm before delete records ?
How can I show a confirm dialog when users press a button?


Nov 19 '05 #3
ad
Thank,
But I can't understand, could you give me more information?

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> ¼¶¼g©ó¶l¥ó·s»D
:Oc**************@tk2msftngp13.phx.gbl...
Here's some server side code that uses javascript to display a confirmation message.

myDeleteButton.Attributes.Add("onclick", _
"return confirm('Are you sure you want to delete?');")

In this example, the Delete button will post back only if the person
confirms they want to delete. Otherwise your server code is never called in response to the button click.

Here's a more detailed analysis of your options, including a free control
that can handle many of the options for you.
http://SteveOrr.net/articles/ClientSideSuite.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:eN**************@TK2MSFTNGP09.phx.gbl...
I want user can confirm before delete records ?
How can I show a confirm dialog when users press a button?


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1743
by: Hal Halloway | last post by:
Newbie looking for the way have a dialog box and when a user goes to this page they see *nothing*, Except for a dialog box pop, the box says: "are you sure?" Yes/No. If user clicks yes they see the...
3
2827
by: Doug O'Leary | last post by:
Hey, all; Apparently, I'm missing the concept. I'm writing a web app in perl to manage nagios configuration files. One of the things I'd like to do is to confirm an update via a popup window...
1
1931
by: Billy | last post by:
Hi... I have a problem with a confirm dialog box. I want to execute some code and then prompt the user with a confirm dialog box who's message will depend on the result of the execution from...
2
5477
by: JerryK | last post by:
I have a piece of asp.net code that sets up a call to a javascript function in a controls onclick event. This javascript function displays a confirm dialog and returns the results of the confirm...
3
5594
by: ad | last post by:
I can only use the OnClientClick event of a button to show a confirm dialog like: OnClientClick="return confirm('Are you sure?');" Can we show the confirm dialog by progrm, net triggered by a...
8
4012
by: rn5a | last post by:
I have gone through a no. of posts in this NewsGroup regarding my problem but alas, couldn't come across one which would have helped me in resolving the issue. My problem is this: An ASPX Form...
5
5399
by: strikefiend | last post by:
Ok, I'm somewhat new to .NET C# language and am having a bit of trouble. I'm trying to run the javascript confirm() method from my ascx page but I'm currently using C# as the main language of the...
13
2100
by: MikeC | last post by:
I read in the book Javascript The Definitive Guide by David Flanagan the following in reference to the use of alert, confirm, and prompt. "Although these dialog methods are extremely simple and...
1
7468
by: =?Utf-8?B?UmFq?= | last post by:
In my user control, I have included javascript code using ScriptManager.RegisterClientScriptBlock(). JavaScript code has a confirm message dialog box and we store the message value in a hidden...
0
7221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7109
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.