M
Mark D'Souza via .NET 247
In trying to create a Panel object with the FindControl methodusing a string variable as the paramater. The code is below. The variable 'testvariable' is equal to pnl_0 which is anexisting Panel on my page. It appears that I am unable to use avariable as the parameter for the method as I get the followingerror message:
"Object reference not set to an instance of an object"
CODE:
Panel pnl = (Panel) FindControl(testvariable);
pnl.Visible = false;
Any assistance would be greatly appreciated. I'm been playingaround with it for the last litte while and cannot find a workaround.
"Object reference not set to an instance of an object"
CODE:
Panel pnl = (Panel) FindControl(testvariable);
pnl.Visible = false;
Any assistance would be greatly appreciated. I'm been playingaround with it for the last litte while and cannot find a workaround.