I have a web site I am building in ASP.NET, and have created a web
user control which has to dropdown list that get populated form a
database. from the selections made in the drop downs, a datagrid is
generated filled with all the part relevant to the selection.
My problem is that the actual page that contains the datagrid, can not
get access to the values within the two dropdown lists. I have tried
setting a shared read only property in the web user contol which
returns the drop down values, but it tells me that it "cannot refer to
an instance member of a class ... without an explicit instance of the
class" so I changed the WithEvent declaration of the drop downs at the
top of the class to be protected shared, and this works, but every so
often the declaration will change back to protected, and the page will
not work.
What is the correct way to retrieve these values?
Thanks