예제 #1
0
    protected void parent_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataList    list  = e.Item.FindControl("child") as DataList;
        DataRowView drv   = e.Item.DataItem as DataRowView;
        DataTable   table = t_2.type_2list(int.Parse(drv["typeid_1"].ToString()), "");

        list.DataSource = table.DefaultView;
        list.DataBind();
    }
예제 #2
0
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        type_2 ty2 = new type_2();
        int    id1 = int.Parse(DropDownList1.SelectedValue);

        drop2.DataSource     = ty2.type_2list(id1, "").DefaultView;
        drop2.DataTextField  = "type_2name";
        drop2.DataValueField = "typeid_2";
        drop2.DataBind();
    }