Hi All,
i am developing an application using ASP.NET with C#.
in my application when i am deleting an item it shows a confirm Message like
Are you sure you want to delete this item? with "OK" and "Cancel" buttons.
if user will click the 'OK' button,the item will get deleted and if user clicks Cancel button,no action is performed.
for that i had written the code in PageLoad like
if (!Page.IsPostBack)
{
btndelete.Attributes.Add("onclick", "if (!confirm('Are you sure you want to delete this Item?')) return false");
}
upto now it is working fine.
in other case to delete an item i have to check one condition.i.e i have a checkbox. if that checkbox is checked,then only the alert box will get display.
for that i had write the code like
if (Checkbox1.Checked == true)
&nbs ...
Go to the complete details ...