Help: User control dim changes RIGHT UNDER MY NOSE!

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

I changed a usercontrol dim from:
Protected WithEvents ddlView As System.Web.UI.WebControls.DropDownList
to:
Public Shared ddlView As System.Web.UI.WebControls.DropDownList

I saved it SEVERAL times. It was working for about a day then, as I'm
programming today, I notice that it's changed back to the original. Any
ideas? This happened several times and each time I fix it it works fine.

Thanks in advace.
 
this declaration was likely done by the vs.net (in other words, this is
generated code). vs.net could be the one changing it back, so you need
to find a better way to work with this control. why is it shared? maybe
using public properties to access the protected control would be better
 
if the property is shared, the other item has to be shared. why is the
property shared? i dont get that part.
 
I'm not the original poster, but I'm having the same problem. If I don't
make the property shared, I get the error "Reference to a non-shared member
requires an object reference" when trying to access the property from the
parent page.

Chris
 
Back
Top