Пример #1
0
        private void BindMCategory()
        {
            List <Model.memberType> listmt = null;

            if (Request.QueryString["id"] != null)
            {
                int id = Convert.ToInt32(Request.QueryString["id"]);
                listmt = bllmt.GetModelList("MtID!=" + id);
            }
            else
            {
                listmt = bllmt.GetModelList("");
            }
            MCategory.DataSource     = listmt;
            MCategory.DataTextField  = "TypeName";
            MCategory.DataValueField = "MtID";
            MCategory.DataBind();
            MCategory.Items.Insert(0, new ListItem("", "0"));
        }