示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ParaID.DataSource     = PopDatasource().Tables[0].DefaultView;
            ParaID.DataTextField  = "ParaID"; //dropdownlist的Text的字段
            ParaID.DataValueField = "ParaID"; //dropdownlist的Value的字段
            ParaID.DataBind();

            StatValue.Text = "";
        }
示例#2
0
        string tableName = "";//?tableName=STATPARA


        protected void Page_Load(object sender, EventArgs e)
        {
            tableName = HttpContext.Current.Request["tableName"].ToString().Trim();
            if (string.IsNullOrWhiteSpace(tableName))
            {
                Response.Write("<script> alert(\"请传入表名!\")</script>");
                return;
            }
            else
            {
                ParaID.DataSource     = PopDatasource().Tables[0].DefaultView;
                ParaID.DataTextField  = "ParaID"; //dropdownlist的Text的字段
                ParaID.DataValueField = "ParaID"; //dropdownlist的Value的字段
                ParaID.DataBind();

                StatValue.Text = "";
            }
        }