Accessing controls in the edititemtemplate of a listview

前端 未结 6 1970
半阙折子戏
半阙折子戏 2021-01-06 10:38

I am working with the listview control. By default I am showing the itemtemplate with an edit button. When the edit button is pressed the listview switches to the edititemte

6条回答
  •  长情又很酷
    2021-01-06 11:25

    protected void ListView1_ItemUpdating(object sender, ListViewUpdateEventArgs e)
    {        
            ListBox myListBox = (ListBox)(((ListView)sender).EditItem.FindControl("ListBox1")); 
    }
    

提交回复
热议问题