Last post Sep 27, 2012 08:10 AM by Tarunjit
Sep 26, 2012 04:13 AM|Tarunjit|LINK
The application is created in 'VS 2010 Ultimate' website model. My operating system is 'Windows 7 Professional'
which is 64 bit. I have installed SP1 also. During compilation i am getting below errors-
'Textbox' or label is not declared. It may be inaccessible due to its protection level.
Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
Even the text box, label or button exists on aspx page, compiler is not recognising the controls while compiling. Intellisence is working in code behind file for controls.
Please let me know what i am missing.
The application is running successfully on client machine.
I searched over net and found that installing VS 2010 SP1 will correct the error. I have installed the same but no success. Some one suggests that installing the hot fix KB981167 will correct the error . I tried to install the patch KB981167 but getting
error as “KB981167 does not apply, or is blocked by another condition on your computer.”.
Sep 26, 2012 11:26 AM|David Anton|LINK
The 'Handles' error can be fixed by structuring your control declaration like this:
Public WithEvents myTextBox As TextBox
Sep 27, 2012 08:10 AM|Tarunjit|LINK
In website model we don't have to specify WITHEVENTS specifically for each textbox. And moreover it is working on client machine. I tried with lots of options as specified in original question but no success as of yet.