Help: User control dim changes RIGHT UNDER MY NOSE!

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.
 
K

Kairi Zikpin

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
 
K

Kairi Zikpin

if the property is shared, the other item has to be shared. why is the
property shared? i dont get that part.
 
C

Chris Mahoney

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top