Is there a way to make a code behind cal from the javascript alert box. I am using a button on grid view. Upon click of it..it should alert a confirm box...and later make a cal to code behind function. This is the part of code behind cal.
protected void GridView1_RowDataBound(object source, GridViewRowEventArgs e)
{
......
btnAlertStatus.Attributes.Add("onclick", "javascript:if(confirm('Are you sure you want to send an email " + ID+ " ?') == true) EmailTest(ID); ");
......
}
protected void EmailTest(int ID)
{
}
This way I am not able to access the send_Email....is there a better way to cal this function in rowboundevent