我需要在删除按钮上添加一个“你确定”弹出窗口,我不确定如何获取用户是单击确定还是取消。
这是我的做法:
string message = "Are you sure you want to delete this user?";
System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("return confirm('");
sb.Append(message);
sb.Append("');");
Type type = this.GetType();
ClientScript.RegisterOnSubmitStatement(type, "alert", sb.ToString());