|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Referencing controls inside FormViewHi
This question is related to ASP WebApplication , I have a FormView on the Page and the FormView has Templates like InsertItemTemplate, EditItemTemplate etc. on the InsertItemTemplate i have a control named FormView1.InsertItemTemplate.InsertTemplate.TextBoxLastName what is the method of referencing the controls "TextBoxLastName" in code TIA Barry You cannot reference controls in templated container directly, use
TextBox textBox = (TextBox) formView.FindControl("TextBoxLastName"); hope this helps -- Show quoteMilosz "Barry" wrote: > Hi > > This question is related to ASP WebApplication , I have a FormView on the > Page and the FormView has Templates like InsertItemTemplate, > EditItemTemplate etc. on the InsertItemTemplate i have a control named > > FormView1.InsertItemTemplate.InsertTemplate.TextBoxLastName > > what is the method of referencing the controls "TextBoxLastName" in code > > TIA > Barry > > > |
|||||||||||||||||||||||