Solved

Confirmation of delete alternative to JavaScript

Posted on 2011-03-24
2
459 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Question about JQuery and asp.net 3 30
Adding bootstrap to only Content page and NOT master page 1 47
Change to file doesn't show up 16 51
Get month and date in a format 4 31
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

809 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