Error message in web Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
Mycode
using System.Windows.Forms;
protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e) { var confirmResult = MessageBox.Show("Are you sure to delete thisitem??", "Confirm Delete!!", MessageBoxButtons.YesNo); if (confirmResult == DialogResult.Yes) { string terminal_id = GridView2.DataKeys[e.RowIndex].Value.ToString(); selectTerminal(); deleteTerminal(terminal_id); } else { // If 'No', do something here. } }
Aucun commentaire:
Enregistrer un commentaire