Hi Guys,
I have hit a wall with the my project... The problem is that i need to get
the type of a usercontrol that is not in the assembly of the page that is
tryiong to call it. if anyone knows of how to fix this please let me know.
c.setComponentP roperties(Reque st.QueryString["pageID"],"1");
classname = c.cSrc;
t = System.Type.Get Type(classname) ;
uc = (UserControl)Ac tivator.CreateI nstance(t);
ctl =
uc.LoadControl( System.Configur ation.Configura tionSettings.Ap pSettings["virtualPat h"]
+ classname.Subst ring(classname. LastIndexOf("." ) + 1) + ".ascx");
t.GetProperty(" ComponentID").S etValue(ctl,c.c ID.ToString(),n ull);
PlaceHolder phPlaceHolder1 =
(PlaceHolder)th is.FindControl( "Form1").FindCo ntrol("PlaceHol der1");
phPlaceHolder1. Controls.Clear( );
phPlaceHolder1. Controls.Add(ct l);
string mode = "edit";
litContentBegin .Text = "<div id=\"con\"
onMouseOver=\"s howEditableArea (this);\"
onMouseOut=\"hi deEditableArea( this);\"
onClick=\"editC omponent('../siteadmin/components.aspx ?mode=" + mode +
"&placeholderID =" + "1" + "&pageID=" +
Request.QuerySt ring["pageID"].ToString() + "');\">";
litContentEnd.T ext = "</div>";
Thanks
Josh
I have hit a wall with the my project... The problem is that i need to get
the type of a usercontrol that is not in the assembly of the page that is
tryiong to call it. if anyone knows of how to fix this please let me know.
c.setComponentP roperties(Reque st.QueryString["pageID"],"1");
classname = c.cSrc;
t = System.Type.Get Type(classname) ;
uc = (UserControl)Ac tivator.CreateI nstance(t);
ctl =
uc.LoadControl( System.Configur ation.Configura tionSettings.Ap pSettings["virtualPat h"]
+ classname.Subst ring(classname. LastIndexOf("." ) + 1) + ".ascx");
t.GetProperty(" ComponentID").S etValue(ctl,c.c ID.ToString(),n ull);
PlaceHolder phPlaceHolder1 =
(PlaceHolder)th is.FindControl( "Form1").FindCo ntrol("PlaceHol der1");
phPlaceHolder1. Controls.Clear( );
phPlaceHolder1. Controls.Add(ct l);
string mode = "edit";
litContentBegin .Text = "<div id=\"con\"
onMouseOver=\"s howEditableArea (this);\"
onMouseOut=\"hi deEditableArea( this);\"
onClick=\"editC omponent('../siteadmin/components.aspx ?mode=" + mode +
"&placeholderID =" + "1" + "&pageID=" +
Request.QuerySt ring["pageID"].ToString() + "');\">";
litContentEnd.T ext = "</div>";
Thanks
Josh
Comment