title: Basepage handling events with two different types of controls
body: <p>My problem is thus...</p>
  
  <p>I have 4 pages which all essentially do the same thing, that is to value a specific vehicle based on the information entered, each of these pages is over 3.5k lines in the code behind.  </p>
  
  <p>The pages need to remain separate to allow for some minor differences between the way in which each page is accessed and to allow for future changes, however they all use the same IDs for controls so I saw no reason why I couldn't move the event handlers to the base page along with primary functions, this would allow rapid addition of future pages just by referencing the base page and setting any in page overrides that I need.</p>
  
  <p>So the actual problem is that I am defining the controls as public in the base page e.g.
  "Public WithEvents lstCAPManufacturers As FLHighComboBox"
  Now this is fine from 2 of the pages as they use our own user control FLHighComboBox, the problem arises when called from the other 2 pages which use standard .Net dropdowns and the public declaration dies.  The same thing is occurring image buttons in one page which are standard buttons in the others, and .Net textboxes in one page which are (Telerik) RadTextBoxes in others.</p>
  
  <p>I did consider declaring all controls of this type as objects, and then casting them to the appropriate control in a function called on page load, however this just causes masses of compilation errors and I am unable to access properties and methods for them because they are already defined as type Object.</p>
  
  <p>So I'm really after suggestions for how I can make this kind of thing work, or if not how to make this work, what I should be doing instead.</p>
  
  <p>Thank you.</p>