Adding ascx control to webpart template

Jun 25, 2009 at 10:47 AM

Hi,

how can I add an ASCX control to the webpart template ?

I would like to design the ascx control with the viewer and than "attach it" to the webpart class of the project...is it possible ? how ?

Thanks
Bye

Jun 26, 2009 at 11:58 AM
You can try create a .ascx and next add a placeholder to your webpart and in code make

MyPlaceHolder.Controls.add (Page.LoadControl(Server.MapPath("~/Modules/MyUserControl.ascx")));

Its anything like this.


From: [email removed]
To: [email removed]
Date: Thu, 25 Jun 2009 02:47:04 -0700
Subject: Adding ascx control to webpart template [smarttemplates:60616]

From: evil80
Hi,
how can I add an ASCX control to the webpart template ?
I would like to design the ascx control with the viewer and than "attach it" to the webpart class of the project...is it possible ? how ?
Thanks
Bye


Quer uma internet mais segura? Baixe agora o novo Internet Explorer 8. É grátis!