nikhilparchure
Programmer
Hi Guys ,
Have made UserControl for some common functionality.
This usercontrol exposes some properties that needs to be assinedat runtime.
I have some problem doing this.
I have been able to achevive this using the below code
----------------------------------------
Dim TestControl As Control
TestControl = LoadControl("TestUserControl.ascx"
((TestUserControl)TestControl).ClientPage = this
But I want to use the drag-drop facility of UserControl
such that
I have the folowing declaration in the container aspx page
<%@ Register TagPrefix="TestUserControl" TagName="TestControl" Src="../CustomControls/TestUserControl.ascx" %>
and I include the entry in the <body> as
<TestUserControl:TestControl id="TestPage" runat="server"></TestUserControl:TestControl>
now I would like to assign the ClientPage property of my TestUserControl using the codebehind , but I am not able to get this in CodeBehind nor in inline code, how would I achieve that.
*******************************************************
To be short , I would like to have the reference of the container.aspx page passed on to the usercontrol at runtime.
******************************************************
I might be missing some stuff , pls guys help me.
Regards
Parchure Nikhil
Have made UserControl for some common functionality.
This usercontrol exposes some properties that needs to be assinedat runtime.
I have some problem doing this.
I have been able to achevive this using the below code
----------------------------------------
Dim TestControl As Control
TestControl = LoadControl("TestUserControl.ascx"
((TestUserControl)TestControl).ClientPage = this
But I want to use the drag-drop facility of UserControl
such that
I have the folowing declaration in the container aspx page
<%@ Register TagPrefix="TestUserControl" TagName="TestControl" Src="../CustomControls/TestUserControl.ascx" %>
and I include the entry in the <body> as
<TestUserControl:TestControl id="TestPage" runat="server"></TestUserControl:TestControl>
now I would like to assign the ClientPage property of my TestUserControl using the codebehind , but I am not able to get this in CodeBehind nor in inline code, how would I achieve that.
*******************************************************
To be short , I would like to have the reference of the container.aspx page passed on to the usercontrol at runtime.
******************************************************
I might be missing some stuff , pls guys help me.
Regards
Parchure Nikhil