Link to home
Start Free TrialLog in
Avatar of sbickerstaff
sbickerstaffFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Confirmation of delete alternative to JavaScript

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.
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sbickerstaff

ASKER

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.