private void SetQC(string qcid) { var advUrl = string.Empty; var advOpen = string.Empty; AdvBO.UpdateAdv(CurrentWeb, ListsName.InternalName.AdvList, qcid, HttpContext.Current, ref advUrl, ref advOpen); if (!string.IsNullOrEmpty(advUrl)) { if (!string.IsNullOrEmpty(advOpen)) { ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "qc-" + qcid, "window.open('" + advUrl + "','" + Utilities.GetPreByTime(DateTime.Now) + "_window');", true); } else { HttpContext.Current.Response.Redirect(advUrl); } } }
/// <summary> /// Load default value to control and other initialize. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { rptAdv.ItemDataBound += new RepeaterItemEventHandler(rptAdv_ItemDataBound); wpTitle = ((ContainerWebPart)this.Parent).Title; if (!Page.IsPostBack) { AdvBO.BindAdv(CurrentWeb, ListsName.InternalName.AdvList, rptAdv, wpTitle); } else { var argValue1 = Request.Form["__EVENTTARGET"]; if (argValue1.Contains("aLink")) { if (!string.IsNullOrEmpty(hdQC.Value)) { SetQC(hdQC.Value); } } } }