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

Client-side Confirm() Needs To Run Before Server-side Code

I check to see if a certain submission button is asking for removal. If the removal is true, I update a recordset's delete column. This has been tested and it works. However, now I'd like to prompt the user to make sure that he/she wants to remove the record.
Feb 8 '09 #1
2 2151
PRR
750 Expert 512MB
@satyabhaskar
Look into ConfirmButton
Feb 10 '09 #2
Frinavale
9,735 Expert Mod 8TB
If you're not interested server side whether or not the person hit "ok" or "cancel", and you simply want to give the user a way to cancel the postback, then you can simply use the JavaScript confirm. The JavaScript confirm returns a true or false value depending on what the user clicks.

Note that if your ASP.NET has it's OnClientClick set to return "false" it will prevent the postback from occurring. Therefore, if you set your ASP.NET button to return this value resulting from the confirm, it will either allow or cancel the postback to the server depending on what the user selects.

For example:
Expand|Select|Wrap|Line Numbers
  1. <asp:Button ID="myDeleteButton" runat="server" text="Delete" OnClientClick="return confirm('Are you sure you want to proceed with the delete?');" />
Feb 10 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: R.A. | last post by:
Hi, I have a web service that process a client call. When a client makes a call to the web method the method needs to query some data from a client_A and return the data to the calling client_B....
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
67
by: Mike MacSween | last post by:
I've got a SQL Server database. Nearly finished. It's going to go on a single non networked machine. One day somebody might get access to it over ADSL (probably TS), but for now it's a single user...
3
by: Greg Liles | last post by:
I've logged into an ASP.Net server through my browser. My browser runs an activex control. The activex control starts an activex EXE that needs to communicate to the server. The problem is when...
9
by: CGW | last post by:
I asked the question yesterday, but know better how to ask it, today: I'm trying to use the File.Copy method to copy a file from a client to server (.Net web app under IIS ). It looks to me that...
10
by: Don Curtis | last post by:
I have a C# client app that sometimes needs to do thousands of specialized file renames of files on a file server in the same domain. If the files reside locally on the client machine, the renames...
5
by: adebiasio | last post by:
I have an application where the server needs to call the client. I have a framework working with .net remoting where the client and server are on the same network and the server can call the...
8
by: semedao | last post by:
Hi , I need to develop some feature of web service that can notify client - "Push" operation - and fast somebody know if it's possible , and how? When I say "Push" I mean - pure push :) , not...
8
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! I am trying to send a Mail using SmtpClient on my developer computer. Is it not possible? Do i have to use it on a computer with IIS installed? If it is possible, what should i be...
2
by: dvestal | last post by:
I'm new to .NET remoting, and I'm having trouble getting a callback to work from a server. I've been through a dozen webpages and the references available to me, but I'm still missing something. ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.