I have a button which will execute this when clicked:
protected void Button6_Click(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(this.GetType(),
"myScript", "AnotherFunction();", true);
}
I also have another server side function which is this:
public void Delete()
{
//Delete Code
}
After clicking the button, it will now go to this javascript function:
Now what i want to do is, call the Delete() function on the SERVER side .Here is my javascript function what i have tried so far
function (isConfirm)
{
if (isConfirm)
{
//CALL DELETE FUNCTION HERE Delete();
swal("Deleted!", "Your imaginary file has been deleted.", "success");
}
else
{
swal("Cancelled", "Your imaginary file is safe :)", "error");
}
});
How can i call that server side function? Any idea?