Click to See Complete Forum and Search --> : Variable redeclared after moving to code-behind


AndyZulu
June 18th, 2008, 03:26 AM
Hi

Any assistance on this one, driving me crackers (%->)

If I move a declaration of a TreeView from the designer.cs file to the code-behind file and change the scope from protected to public, the compiler has no problem.

But, at run-time (when I access the page) I get an exception saying that the variable has been re-declared!

It seems that the auto-generated desginer.cs file is being re-created and then their is a variable conflict 'cos I have moved the declaration.

Thanks

Andy