Hello,
I made a base class for all the pages in my project, so that instead
of "public class CSomePage : System.Web.UI.Page" i got "public class
CSomePage : CPage
Since some parameters are common to all pages, i did put some server
hidden fields controls in the base class.
Ex: (in the base class)
protected Gam.CHiddenField mIdEntreprise;
protected Gam.CHiddenField mIdCoord;
Like that, i put some <asp:CHiddenField ... /> in each aspx and i can
reference my controls (mIdEntreprise and mIdCoord) in the derived
classes. Works great.
However when i modify the html code in an aspx the vs editor is adding
the following code in the derived class :
protected Gam.CHiddenField mIdEntreprise;
protected Gam.CHiddenField mIdCoord;
Thus overriding the declarations in the base class, resulting in
errors at runtime. I have to remove the declarations in the derived
class manually everytime, very annoying. How can i stop the vs editor
to add the declarations in the derived class, if the control is
already declared in the base class?
Thanks for any help. Matt