I am using the below code to create a button in code behind and also create confirm message box for that button.But its not working please help me to create this..
Button btn2 = new Button();
btn2.Attributes.Add(
"OnClientClick",
"if (confirm(''Are you sure you want to add this estimate data?')) return;");
if(true)
{
//Do something
}