一个老生长谈的问题-获取confirm的返回值
如题,首先声明:乱答的或模糊答的不给分,不知道就是不知道!
现在正题:我引用了system.windows.forms.dll引用,加入了system.windows.forms命名空间,然后在一个imgbutton的click事件里写了:
public partial class Frame_Frame_Top : System.Web.UI.Page
{
HtmlWindow orderwindow;
HtmlElement formElement;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
online.Text = Application[ "online "].ToString();
online.ForeColor = Color.Yellow;
if (Session[ "uName "] != null)
{
uname.Text = Session[ "uName "].ToString();
}
if (Session[ "uDeptName "] != null)
{
Dept.Text = Session[ "uDeptName "].ToString();
}
//IMG1.Attributes.Add( "onclick ", "javascript:window.parent.location.href( '../Login/Login.aspx ') ");
}
}
protected void img_Click(object sender, ImageClickEventArgs e)
{
WebBrowser web=new WebBrowser();
HtmlDocument doc = web.Document;
orderwindow = doc.Window.OpenNew( "../Login/Login.aspx ", " ");
bool flag = orderwindow.Confirm( "是否決定退出繫統? ");
if (flag)
{
string str = "update EMP_STATE set STA_NOW= '0 ' where EMP_ID=(select EMP_ID from EMP where EMP_NAME= ' " + Session[ "uName "].ToStrin