473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Confirmation After Button_Click

A.M
Hi,

I have a Button in and ASPX page. Because the button functionality is
critical, i have to pop-up a javascript alert function and ask user "Are you
sure ?"
What would be the best .NET way to do that ?

Thanks,
Ali
Nov 18 '05 #1
3 1059
A.M
I found a nice solution here :
http://authors.aspalliance.com/aldot...amples/cd.aspx

Anybody has better idea?

Ali

"A.M" <IH*******@sapm123.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a Button in and ASPX page. Because the button functionality is
critical, i have to pop-up a javascript alert function and ask user "Are you sure ?"
What would be the best .NET way to do that ?

Thanks,
Ali

Nov 18 '05 #2
In your code behind: button.attributes.add("onclick", "return confirm('Are
you sure');")

"A.M" <IH*******@sapm123.com> wrote in message
news:OD****************@TK2MSFTNGP10.phx.gbl...
I found a nice solution here :
http://authors.aspalliance.com/aldot...amples/cd.aspx

Anybody has better idea?

Ali

"A.M" <IH*******@sapm123.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a Button in and ASPX page. Because the button functionality is
critical, i have to pop-up a javascript alert function and ask user "Are

you
sure ?"
What would be the best .NET way to do that ?

Thanks,
Ali


Nov 18 '05 #3
Add this.

strMsg = "return confirm('Are you sure?');"

imgBtn.Attributes.Add("onclick", strMsg)

"A.M" <IH*******@sapm123.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a Button in and ASPX page. Because the button functionality is
critical, i have to pop-up a javascript alert function and ask user "Are you sure ?"
What would be the best .NET way to do that ?

Thanks,
Ali

Nov 18 '05 #4

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

Similar topics

1
by: Paul Aspinall | last post by:
Hi I have a form with a button on it. It seems that when I click the button, it causes Form_load to fire, before the Button_Click procedure Does anyone know why?? Thanks
3
by: Tim Thomas | last post by:
Hi, I am very new to .NET and am in the process of building my first web application. I will briefly describe what i am trying to achieve: I have a system where suppliers register their...
6
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...
2
by: Frank Schumacher | last post by:
Hi Folks, I have a problem with the order of events fired by ASP.NET. I found many articles which explaining the lifecycle of a site, but I found none which took the event from a Control on the...
3
by: I am Sam | last post by:
Please help. I'm dying here and pulling out the last few remaining elements of my hair over this. I have built a form that will identify and authenticate users. I keep getting the following...
9
by: gaddoznntp | last post by:
Hi all, I've a server button handling a button_click procedure. If the client user clicks the button, the page causes the postback and the button_click procedure is fired. Then, if the user...
13
by: Matt | last post by:
I am trying to call a recursive subroutine within a Button_Click event. How can I do this? I tried to create a seperate Function() but it will not allow me to use any variables that I created in...
2
by: bienwell | last post by:
Hi all, I still have a problem when using Confirmation box in ASP.NET program. I need to get the value return of YES or NO from confirmation box in Sub function of VB program to do some tasks....
2
by: bay_dar | last post by:
Hi, I have an internal ASP.NET application that I'm are using to send e-mails out based on a single milepost or milepost range entered. I'm trying to do two things when a user clicks on the...
0
by: John | last post by:
I am loading my controls dynamically into my asp.net page. When I click on a button on one of those user controls then page reloads and I need to reload the page based on what has happened in the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.