View Single Post
Old 01-10-2006, 06:34 PM   PM User | #1
shaoen01
New Coder

 
Join Date: Aug 2005
Posts: 63
Thanks: 1
Thanked 0 Times in 0 Posts
shaoen01 is an unknown quantity at this point
Prompt confirmation after button click

I wish to add an attribute to the button click in asp.net to prompt a confirmation box using javascript. Also, is it possible to perform a function after a button click before i prompt the confirmation box? This function will return a value indicating whether i should prompt the confirmation box.

I know i should add a code as shown below but it does not work somehow:
Code:
        btnDelete.Attributes.Add("onClick", "javascript:return confirm('Are you sure you want to delete these rows?')")
Thanks
shaoen01 is offline   Reply With Quote