private void Page_Load(object sender, System.EventArgs e) { // �ڴ˴������û������Գ�ʼ��ҳ�� if(!Page.IsPostBack) { itemid = (Request.QueryString["ItemID"]==null)?0:Int32.Parse(Request.QueryString["ItemID"].ToString()); ViewState["itemid"] = itemid; BBSClass bbsclass = new BBSClass(); try { ddlBoardList.DataSource = bbsclass.GetAllBoard(); ddlBoardList.DataTextField = "board_name"; ddlBoardList.DataValueField = "board_id"; ddlBoardList.DataBind(); } catch(Exception ex) { UDS.Components.Error.Log(ex.ToString()); Server.Transfer("../../Error.aspx"); } } else { itemid = Int32.Parse(ViewState["itemid"].ToString()); } }