Hi Friends, I have decalred my control vaiables in a base class and written some event on it.the i have some othere drived class and finally i am inheriting these calss in my child class which (UI) layer.I have created the public propery of there variables in my UI and accessing and assiging data through these property.But i am facing one problem when i am opening my UI form VS creates the duplicate definition in my code behind page.I don't know why it is happening.I will just show you the code snippet. Base Class ***************** Protected ConnectionString As String = ConfigurationSettings.AppSettings("ConnectionString") Protected _UrlReferrer As TextBox Protected _PageTitle As Label Protected WithEvents _ErrorValidator As CustomValidator Public _ErrorSummary As ValidationSummary Protected WithEvents _Search As HtmlInputButton Protected _SortBy As TextBox Protected WithEvents _Grid As DataGrid
Next Class **************** Public Class EditForm Inherits BaseForm Protected WithEvents _Insert As HtmlInputButton Protected WithEvents _Update As HtmlInputButton Protected WithEvents _Delete As HtmlInputButton Protected WithEvents Cancel As HtmlInputButton UI Layer *********** Public Class EmployeeMaster Inherits EditForm Public Property Insert() As HtmlInputButton Set(ByVal value As HtmlInputButton) MyBase._Insert = value End Set Get Return MyBase._Insert End Get End Property Public Property Grid() As DataGrid Set(ByVal value As DataGrid) MyBase._Grid = value End Set Get Return MyBase._Grid End Get End Property like this but in UI it is creating the duplicate definition of control varabiles defined in base class. thanks sandeep |