一个网页我全用Html控件 然后form表单提交 为什么设置的JS提示框都不显示呢 我该怎么修改呢

解决方案 »

  1.   

    哦  
    string art_name = Request.Form["T_name"];
                 string art_descript = Request.Form["T_descript"];
                 string art_type = Request.Form["Select_type"];
                 string art_size = Request.Form["T_size"];
                 string art_material = Request.Form["T_material"];
                 string art_author = Request.Form["Select_author"];
                 string art_date = Request.Form["T_date"];
                 string art_pic = HttpContext.Current.Request.Files[0].FileName;
                 string art_code = string.Format("G{0}", DateTime.Now.ToString("yyyyMMddhhmmss"));             Gallery.BoothReservation BR = new BoothReservation(); 
                 ArtInfo ai = new ArtInfo();
                 ai.Art_name = art_name;
                 ai.Art_description = art_descript;
                 ai.Art_type = art_type;
                 ai.Art_size = art_size;
                 ai.Art_material = art_material;
                 ai.Art_authorName = art_author;
                 ai.Art_createDate = art_date;
                 ai.Art_imgUrl = Path.GetFileName(art_pic);
                 ai.Art_Code = art_code;
                 bool isOK = BR.InsertArt(ai, 0);
                 if (isOK)
                 {
                     Lterror.Text = webUtility.alert("添加国画成功");
                 }内容加到数据库了 但是就是不弹出框提示
      

  2.   

    public static string alert(string strText)
        {
            return "<script>alert('" + strText + "')</script>";
        }
    只是alert方法