Hi
I am baffled with some stuff i am noticing in VS 2005.
Please let me know if i am doing something incorrect.
Here are a few things:
Issue 1:
1. I created a base user control called MYUserControlBase.
2. I added a property called MYProperty with internal modifier.
3. I created another user control called MyUserControl which inherits MYUserCOntrolBase.
4. Now, when i try to access the property MYProperty (by typing this.) in MyUserCOntrol, i notice the intellisense does not display MyProperty.
5. Also, when i type in this and try to access NamingContainer property in MyUserControl i cannot seem to access it, but if i change the inheritance page to UserControl instead of MyUserCOntrol i can access it?
Is this expected?
Issue 2:
1. I have added a new WebForm called WebForm1.aspx.
2. I have dragged the user control that i have created in the above steps on to this WebForm1.
3. Now, in the usercontrol, MyUserControl.ascx, i typed:
(()this.Page) and tried to cast it to the page, but i can't seem to do it.
Is this also expected?
Issue 3:
1. I have added namespace Test to a class and tried building it, i get this error:
Error 3 Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). C:\Projects\MyProject\WebUserControl.ascx.cs 16 33 C:\...\
Please let me know if you have any answers.
Thanks.