In this article you will find 2 ways how you can do the client side confirmation dialog.
You can set the Attributes property of a button for onClick. I wrote a generic function that can take control as a paratament and the message as a nother parameter. Below is a sample code
public static void CreateConfirmBox(System.Web.UI.WebControls.Button btn, string strMessage)
{
btn.Attributes.Add("onclick", "return confirm('" + strMessage + "');");
}
In ASP.NET 2.0 Button, LinkButton and Imagebutton controls have an OnClientClick property, which makes displaying a confirmation dialog very easy.
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" OnClientClick="return confirm('Are you sure you want to delete this item?');" Text="Delete ASP.NET 2.0" Width="191px" />