• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 731
  • Last Modified:

Protected WithEvents Control Declarations Missing in VS2005

I am attempting to expose Controls and their properties to a base class handler.  I have not been successful, so I thought it might be that my controls were not publicly exposed in the page.

For example, if I type....

Public WithEvents ImageA as System.Web.UI.WebControls.Image

I get an error:

"ImageA is already declared as 'Protected Dim WithEvents ImageA as System.Web.UI.WebControls.Image' in this class"

Okay, great!  Where is it so I can change it from "Protected" to "Public" ???

0
born4code
Asked:
born4code
  • 2
  • 2
1 Solution
 
Elvio Lujan.Net Senior DeveloperCommented:
in vs2005 the class can be divided in two parts... and when you build an form the declarations code is separated of the programmer code... just go the declarations part of the form
0
 
Elvio Lujan.Net Senior DeveloperCommented:
0
 
born4codeAuthor Commented:
"just go the declarations part of the form"

I would love to.  I cannot find anything like that.  The article you point to says that you can simply "Show All Files" from the object browser.  I've done that and it does not show up there either.

?
0
 
born4codeAuthor Commented:
lem,

Well.. nobody responded to this one.
I have finally discovered that this issue is by design with the "web site" project in VS2005.
There is now a fix available.

still giving you the points... the only one who had the guts to take this one on?

cheers.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now