using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class TalkRoom_TalkRoomList : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); DataBindToGridview(); } } public void DataBindToGridview() { string TableStr = ""; ZWL.BLL.ERPTalkSetting MyModel = new ZWL.BLL.ERPTalkSetting(); MyModel.GetModel(); string[] TalkRoomList = MyModel.TalkName.Split('|'); int j = 0; for (int i = 0; i < TalkRoomList.Length; i++) { if (TalkRoomList[i].Trim().Length > 0) { j = j + 1; if (j%2 != 0) { TableStr = TableStr + "" + TalkRoomList[i].ToString() + ""; } else { TableStr = TableStr + "" + TalkRoomList[i].ToString() + ""; //TableStr = TableStr + "" + TalkRoomList[i].ToString() + ""; } } } if (j % 2 != 0) { TableStr = TableStr + ""; } this.Label1.Text = "" + TableStr + "
"; } }