jgd1234567
Programmer
Hi i have a nested control i need to call in about 6 different methods. Therefore at the top of every method i have:
ListBox lbxLeftColumnAdverts = (ListBox)fvwDocument.FindControl("lbxLeftColumnAdverts");
Is it not possible to add a private variable to access this control. I tried placing the following at the top of my class:
private ListBox lbxLeftColumnAdverts = (ListBox)fvwDocument.FindControl("lbxLeftColumnAdverts");
I also tried setting it in the Page_Init method but had no joy. I'm sure this is quite a common problem but i seem to be missing something. Appreciate the help.
Thanks
ListBox lbxLeftColumnAdverts = (ListBox)fvwDocument.FindControl("lbxLeftColumnAdverts");
Is it not possible to add a private variable to access this control. I tried placing the following at the top of my class:
private ListBox lbxLeftColumnAdverts = (ListBox)fvwDocument.FindControl("lbxLeftColumnAdverts");
I also tried setting it in the Page_Init method but had no joy. I'm sure this is quite a common problem but i seem to be missing something. Appreciate the help.
Thanks