I want to show a message box on the successful save of any item. I googled it and tried different solutions, but none of them worked. Here is the code I am using:
This code will help you add a MsgBox in your asp.net file. You can change the function definition to your requirements. Hope this helps!
protected void Addstaff_Click(object sender, EventArgs e)
{
if (intClassCapcity < intCurrentstaffNumber)
{
MsgBox("Record cannot be added because max seats available for the " + (string)Session["course_name"] + " training has been reached");
}
else
{
sqlClassList.Insert();
}
}
private void MsgBox(string sMessage)
{
string msg = "";
Response.Write(msg);
}