Hi Chris,
This code assumes that you have a button on your page called cmdDelete. This code would go in the Page_Load event handler. What is will do is add client-side script to the page sent to the client.
>Hello Cathi,
>
>Could you show me how to use this code?
>
>cmdDelete.Attributes.Add("onclick", "return confirm (""Are you sure?"");")
>
>I am new in ASP.NET and I haven't found the way yet.
>
>Thanks
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi