Example #1
0
        protected void ddlTeam_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable     major      = DropdownlistDB.GetMemberByTeamID(this.ddlTeam.SelectedValue);
            List <Member> memberList = new List <Member>();

            this.ddlMember.DataSource     = major;
            this.ddlMember.DataTextField  = "UserName";
            this.ddlMember.DataValueField = "UserID";
            this.ddlMember.DataBind();
            ListItem lm = new ListItem("", "");

            this.ddlMember.Items.Insert(0, lm);
        }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable team = GetTeamInfo();
         this.ddlTeam.DataSource     = team;
         this.ddlTeam.DataTextField  = "TeamName";
         this.ddlTeam.DataValueField = "TeamID";
         this.ddlTeam.DataBind();
         ListItem li = new ListItem("All", "0");
         this.ddlTeam.Items.Insert(0, li);
         ddlTeam.SelectedIndex = 0;
         DataTable major = DropdownlistDB.GetMemberByTeamID("*");
         this.ddlMember.DataSource     = major;
         this.ddlMember.DataTextField  = "UserName";
         this.ddlMember.DataValueField = "UserID";
         this.ddlMember.DataBind();
         ListItem lm = new ListItem("", "0");
         this.ddlMember.Items.Insert(0, lm);
     }
 }