|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Implement form's onSubmit functionalityHi,
I have a LinkButton control that deletes a user from a database. I'd like to display a client side alert window prompting the user to confirm the delete so that if the users clicks "NO", the form is not posted to the server (something I would do in classical ASP with onSubmit in the form's declaration). What is the easiest/best way to achive this? Thank you. vi, on your Page_Load add something like the following. if your confirm is
yes, the code will continue to the delete event. HTH Jose btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you wish to delete?' Show quoteHide quote "Vi" <V*@discussions.microsoft.com> wrote in message news:04B9BA5F-9142-4881-B412-AFBC637E4031@microsoft.com... > Hi, > I have a LinkButton control that deletes a user from a database. I'd like > to > display a client side alert window prompting the user to confirm the > delete > so that if the users clicks "NO", the form is not posted to the server > (something I would do in classical ASP with onSubmit in the form's > declaration). > > What is the easiest/best way to achive this? > Thank you.
ck_Problems
Datagrid, formatting, carriage returns URGENT - ASP.NET Labels and LinkButtons behaving inconsistently ac CheckBoxList problem. Want to add some javascript to each checkbox Working, sorta...drop down list IE Web Controls : TabStrip and Mulitpage Tab Strip soapExtensionTypes newbie question on Master pages and WebContentPlaceHolder Dynamically Loaded User Controls |
|||||||||||||||||||||||