Use the OnBegin event:
@Ajax.ActionLink("Done", "ActionName",
new AjaxOptions
{
OnBegin = "return ConfirmDone()",
UpdateTargetId = "MyContainerId"
})
You could also use the Confirm ajax option if all you need to do is pop up a confirm box. If you need to do more custom logic (or want to use a custom dialog) then you would need to use OnBegin.
Here is an example of using Confirm:
@Ajax.ActionLink("Done", "ActionName",
new AjaxOptions
{
Confirm= "Are you sure you want to do this?",
UpdateTargetId = "MyContainerId"
})