Solved

Confirmation of delete alternative to JavaScript

Posted on 2011-03-24
2
457 Views
Last Modified: 2013-12-17
I have an asp.net link button (changing to an asp:button if javascript is disabled) for deleting an item and I want to prompt the user for confirmation prior to deletion.  I found a lot of things online about adding javascript into the onclick property of the button(s) and thats fine, I'm pretty familiar with that.

However, I need to have the site conform to the accessibility guidelines, meaning if javascript is turned off, the above option wouldn't work as the onclick, etc, is dependant on javascript - correct? (I know this is true for HTML, but does the runat="server" change this rule?)

Is there any server side option in C# i.e. equivalent of the messagebox in windows forms, which doesn't require javascript?  Or is my only option to submit the page and in the page_load have something that dynamically creates a confirm button or something?

Whether this makes any difference or not, I'm developing for ASP.NET 4.0.
0
Comment
Question by:sbickerstaff
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 250 total points
ID: 35206734
Unforunately the only way you are going to be able to achieve that without using client script is to submit your form, have the server bounce you to a confirmation page, and then submit again.
0
 
LVL 3

Author Comment

by:sbickerstaff
ID: 35206823
Yeah, I thought that might be the only way.  I was hoping I was wrong thoguh.

Finding the same problem with FormView, GridView, etc.  Insert / update options stop when JavScript is disabled.  Having to code my own versions to make them accessible.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question