Click to See Complete Forum and Search --> : ASP with javascript


Funkymonkey
08-10-2005, 03:51 AM
I have a page where a user can search for and delete a record. I neet an alert box to appear to say "Are you sure you want to delete this record".

The problem as I'm new to vb.net and javascript I'm not sure how to go about it. I've tried using simple examples but there's always an error that says that the onclick event of asp:button is not valid.

Really really stuck, thanks for any help

PS Sorry to post this twice but I was usure where to put it!

A1ien51
08-10-2005, 10:10 AM
add it from the code behind

btnId.Attributes.Add("onclick","return confirm('Are you sure?');")

Eric