ahmed
ahmed

Reputation: 33

Finding a textbox inside InsertItemTemplate in Listview

I have tried this but it does not work:

Dim txt As TextBox = CType(lv2.Items(lv2.SelectedIndex) _
    .FindControl("txtCode"), TextBox)

What is the solution please?

Upvotes: 2

Views: 5274

Answers (1)

Tim Schmelter
Tim Schmelter

Reputation: 460138

Dim txtCode As TextBox = _
      CType(lv2.InsertItem.FindControl("txtCode"), TextBox)

Upvotes: 6

Related Questions