Author: vipulmistry | Posted on: 4/8/2010 1:08:38 AM | Views : 291

Hello friends i have created a custom control (RptDate.ascx) which contains 2 textbox. This control is created in folder named "Controls" in root directory. Now i have created a class (clsReport.vb) in App_Code folder. say like this ============================================================= Namespace MyControls public Class clsReport Public Function GetDates() as Control 'TODO: Code End Function End Class End Namespace ============================================================= this class contains a function named GetDates() Now i want return type of this function to be same as my custom control class. In short i want to return an instance of my control class. Say i want to do like this ============================================================= Public Function GetDates() as MyControls.RptDate Dim MyCtrl as New MyControls.RptDate Return MyCtrl End Function ================================ ...

Go to the complete details ...