I have a Usercontrol with a virtual method. When I use this control I want to override this method. I don't know how to do this. Can anybody help Please?
This is the Control:
In the form where I use this control I want to override GetContainerOptions.
This is the Control:
Code:
namespace soReport
{
public partial class ReportContainer : UserControl
{
private string _ProfileName = "";
private string _ReportName = "";
public ReportContainer(string ReportName)
{
InitializeComponent();
_ReportName = ReportName;
}
private void ReportContainer_Load(object sender, EventArgs e)
{
RegistryKey ReportKey = Registry.CurrentUser.OpenSubKey(soSystem.RegistryEntry + soSystem.ApplicationTitle + "\\Reports\\" + _ReportName + "\\" + _ProfileName, true);
if (ReportKey == null)
ReportKey = Registry.CurrentUser.CreateSubKey(soSystem.RegistryEntry + soSystem.ApplicationTitle + "\\Reports\\" + _ReportName + "\\" + _ProfileName);
GetContainerOptions(ReportKey);
ReportKey.Close();
}
public virtual void GetContainerOptions(RegistryKey ReportKey)
{
}
public string ProfileName
{
get { return _ProfileName; }
set { _ProfileName = value; }
}
}
}
In the form where I use this control I want to override GetContainerOptions.