//修改主播信息 protected void UpdateLive_Click(object sender, EventArgs e) { Live live = new Live(); live.Live_ID1 = Convert.ToInt32(Request.QueryString["liveid"].ToString()); live.Live_Title1 = txtName1.Text.Trim(); live.Live_Img1 = @"Img_News\" + FileUpload_img.PostedFile.FileName; live.Live_Url1 = txtUrl.Text.Trim(); try { if (LiveBll.updatelive(live) == 1) { Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('修改成功!');</script>"); } else { Page.ClientScript.RegisterClientScriptBlock(typeof(object), "alert", "<script>alert('修改失败!');</script>"); } } catch (Exception ex) { Response.Write("错误原因:" + ex.Message); } }