// ajax 控制图像的变化 protected void imgbtnCanNull_Click(object sender, ImageClickEventArgs e) { ImageButton ibtn = sender as ImageButton; string imgurl = ibtn.ImageUrl; string imgName = imgurl.Substring(imgurl.LastIndexOf('/') + 1, imgurl.Length - imgurl.LastIndexOf('.') - 1); if (imgName == "yes") { ibtn.ImageUrl = "~/Images/no.gif"; } else { ibtn.ImageUrl = "~/Images/yes.gif"; } int sid = DataConverter.CLng(ibtn.CommandArgument); M_Survey survey = (new B_Survey()).SelReturnModel(sid); survey.IsOpen = !survey.IsOpen; surBll.UpdateSurvey(survey); }