473,499 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Display confirmation alert box in ASP.NET

I can used the RegisterOnSubmitStatement to set the confirmation alert box, i.e. RegisterOnSubmitStatement("submit", "return confirm('Delete Page?');"). But this confirmation box prompted out from two command buttons as I have two command buttons in the form, delete command and print command. How can I set just allow the delete command to prompted confirmation alert box. Moreover, How can I trigger the delete command after the user choose yes from the alert box as the deletion would be done in server side.

Million Thanks
Nov 18 '05 #1
1 3388
add this..
btnDelete.Attributes.Add("onclick","if (!confirm('Delete Page?')) return false");

Av.

"Grey" <er*****@i-cable.com> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
I can used the RegisterOnSubmitStatement to set the confirmation alert box, i.e. RegisterOnSubmitStatement("submit", "return confirm('Delete Page?');"). But this confirmation box prompted out from two command buttons as I have two command buttons in the form, delete command and print command. How can I set just allow the delete command to prompted confirmation alert box. Moreover, How can I trigger the delete command after the user choose yes from the alert box as the deletion would be done in server side.

Million Thanks
Nov 18 '05 #2

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

Similar topics

13
40620
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
3
24159
by: Craig | last post by:
Hi, I'm working on a PHP FTP client, but my testers have complained the delete file link is too easy to hit by mistake. Would it be possible/plausible to write a bit of javascript that pops up a...
10
13417
by: DettCom | last post by:
Hello, I would like to be able to display or hide fields based on whether a specific Yes/No radio button is selected. This is in conjunction with a posting a just made here in the same group...
7
6044
by: Stefan Finzel | last post by:
Hi, is there a way to change the display property on Windows Mobile 2003 SE Mobile/Pocket Internet Explorer? See following example. Please note: visibilty property has the same problem. Is...
3
1942
by: Dennis Allen | last post by:
Hi. On my online ordering form I use browser cookies to keep track of user items. My confirmation page reads: "If any of this information is incorrect, please go back to the order form and...
6
3689
by: Nedu N | last post by:
Hi, I want to have confirmation(Yes/No) on a button of the webform in which there are many validation controls. I want all the validation controls to be triggered first and then Yes/No...
1
2552
by: almarc | last post by:
Problem : Stop an "Unonlaod" when then confirmation is false. Is a really good script but i have just one problem. The problem that i have is when i click on a link. The scipt ask "Do you want to...
1
1477
by: geckobtz | last post by:
Hi Guys, I am trying to build a page in ASP/MSsql with the aid of dreamweaver, the page contains total of 6 Questions, each question has 3 choices, of which one of the choice contains the right...
0
7132
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
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5475
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,...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
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
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
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.