Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to show a confirm dialog?

Reply
Thread Tools

How to show a confirm dialog?

 
 
ad
Guest
Posts: n/a
 
      06-04-2005
I want user can confirm before delete records ?
How can I show a confirm dialog when users press a button?


 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      06-04-2005
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" <> wrote in message
news:...
>I want user can confirm before delete records ?
> How can I show a confirm dialog when users press a button?
>
>



 
Reply With Quote
 
 
 
 
ad
Guest
Posts: n/a
 
      06-04-2005
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]" <> 撰寫於郵件新聞
:OcH5#...
> 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" <> wrote in message
> news:...
> >I want user can confirm before delete records ?
> > How can I show a confirm dialog when users press a button?
> >
> >

>
>



 
Reply With Quote
 
ad
Guest
Posts: n/a
 
      06-04-2005
Thank,
But I can't understand, could you give me more information?

"Steve C. Orr [MVP, MCSD]" <> 撰寫於郵件新聞
:OcH5#...
> 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" <> wrote in message
> news:...
> >I want user can confirm before delete records ?
> > How can I show a confirm dialog when users press a button?
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I show a confirm message before deleting a row in a gridview. Miguel G鏔ez ASP .Net 3 05-13-2009 11:10 AM
not to show menubar,addressbar & etc of browser without any security confirm lale.kat@gmail.com Javascript 1 11-13-2007 09:06 AM
not to show menubar,addressbar & etc of browser without any security confirm lale.kat@gmail.com Javascript 1 11-13-2007 08:47 AM
How to show a confirm box with Button Click ad ASP .Net 3 09-23-2005 10:21 PM
Command "show run" does not show all interfaces Peter Jonas Cisco 3 01-05-2004 12:13 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57