private int itemid; //����ID #endregion Fields #region Methods protected void cmdOK_ServerClick(object sender, System.EventArgs e) { BBSClass bbsclass = new BBSClass(); BBSReplay replay = new BBSReplay(); string replaycontent = ViewState["Content"] + Content.Value; replay.ItemID = itemid; replay.Replayer = username; replay.ReplayIP = Request.ServerVariables["remote_addr"].ToString(); replay.Content = replaycontent.Replace("<","<"); replay.Content = replay.Content.Replace(">",">"); try { replay.ReplayId = bbsclass.ReplayItem(replay); if(ViewState["filename"]!=null && ViewState["filename"].ToString().Trim()!="") replay.Attach(ViewState["filename"].ToString()); BindData(); Content.Value = ""; ViewState["Content"] = ""; ViewState["filename"] = ""; } catch(Exception ex) { UDS.Components.Error.Log(ex.ToString()); Server.Transfer("../../Error.aspx"); } }