use Confirm function of javascript
[
]
And no need to check in the
public void OnConfirm(object sender, EventArgs e)
again for the Yes or NO clicked by user.
public void OnConfirm(object sender, EventArgs e)
will be called only if the user click Yes.