Create a Repeater control in ASP.Net

前端 未结 2 813
长发绾君心
长发绾君心 2021-01-24 14:45

I\'m using two drop down and bind values to that drop down. Now am adding a new button add_new. I want to create the above drop downs below when I click the add button and mai

2条回答
  •  忘掉有多难
    2021-01-24 15:23

    You can achieve the desired result using Repeater control of ASP.Net. You can create any type of template as you wish, see the code below:

    ASPX:

    
        
            
            
            

    CodeBehind:

    protected void Button1_Click(object sender, EventArgs e)
    {
        // data fetching logic
    
        Repeater1.DataSource = data;
        Repeater1.DataBind();
    }
    

提交回复
热议问题