473,405 Members | 2,141 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,405 software developers and data experts.

Get confirmation from user????

Hi all,

I am writing a page that requires a decision from the user, e.g. when the user clicks delete I need a message box to popup and ask the user for confirmation Depending on the users response will depend on whether the ASP.Net delete function is called. I am able to register a Client-side script enough to show a msgbox, but only with an okOnly button, and even if I got a YesNo button to display, is there any way to inject that decision into my ASP.NET code?

This is really causing me a headache so any help with this would be greatly appreciated

Thanks

Karl
Nov 18 '05 #1
3 1092
Karl,

Add the following code to your app in the Page_Load for instance .. :

btnDelete.Attributes.Add("onclick", "return (confirm("Delete this item
?")==true) ;")

Kind regards,

Jurjen de Groot,
Netherlands

"Karl" <an*******@discussions.microsoft.com> wrote in message
news:F7**********************************@microsof t.com...
Hi all,

I am writing a page that requires a decision from the user, e.g. when the user clicks delete I need a message box to popup and ask the user for
confirmation Depending on the users response will depend on whether the
ASP.Net delete function is called. I am able to register a Client-side
script enough to show a msgbox, but only with an okOnly button, and even if
I got a YesNo button to display, is there any way to inject that decision
into my ASP.NET code?
This is really causing me a headache so any help with this would be greatly appreciated
Thanks

Karl

Nov 18 '05 #2
Nice one!!

This now works perfectly

Thank you very much

Karl
Nov 18 '05 #3
Yes.
"Karl" <an*******@discussions.microsoft.com> wrote in message
news:93**********************************@microsof t.com...
Can you add these attributes to a Datagrid ButtonColumn button as well?

Nov 18 '05 #4

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

Similar topics

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...
7
by: Andy | last post by:
I have been struggling with this for a while, and have seen lots of related postings, but nothing (as far as I can see) that answers this directly. Im using vb dotnet and have an aspx that has a...
4
by: DrData | last post by:
I'm working on an ASP.Net application written in C#. On one page, there are several datagrid controls used to display, edit and delete detail records relating to the master record also displayed on...
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: 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
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
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...
0
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
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
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...

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.