Hello all,
when delete button is clicked,i dont want to show the confirm message, i want to do some validation comparing with database tables. if that condition is true , i am displaying alert message, if that condition is false, then i want to show the confirm message.
suppose i am adding this line of code in the load event , it is giving confirm message , as soon as delete button is clicked.
Me.btnDelete.Attributes.Add("onClick", " return confirm('Do you want to delete the record?');")
in delete button i write these lines of code
VB Code:
validation() if condition=true then //display alert message else ClientScript.RegisterStartupScript(Me.GetType(), "script", "getConfirm();", True) end if
In this case it is deleting the record from the table then it is displaying the confirm message.VB Code:
if page.Ispostback then //delete the record from the table end if
Kindly help me to solve this
Thanks


Reply With Quote