Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DataList UserControl Load Dynamically

Thread Tools

DataList UserControl Load Dynamically

Posts: n/a
I have a default page that I load usercontrols depending on requirements
through a master template using a PlaceHolder i.e.
//some logic here.....
Control UCUsers = LoadControl("../UserControls/users.ascx");
PlaceHolderUC.Controls.Add(UCUsers );

the datalist control (ascx) loads correctly but when I try click the
datalist template image button

i.e. <ItemTemplate>
<asp:ImageButton ID="imgBtnClick" tooltip ="click to view
user" height="8" ImageUrl="../Images/icon_blue_triangle.gif" runat="server"
CommandName="show" />
<%# DataBinder.Eval(Container.DataItem, "username")%>
<%# DataBinder.Eval(Container.DataItem, "startdate",

the control dissapears and even putting a breakpoint on the
method does not get hit

can any suggest a workaround for this

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you load a usercontrol into another usercontrol? ASP .Net 3 06-22-2008 11:00 PM
load dynamically UserControl Stan SR ASP .Net 1 10-04-2006 04:44 PM
How To load a UserControl Dynamically with ATLAS? ASP .Net 2 07-25-2006 07:08 AM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Use LoadControl to load a usercontrol but the webcontrol in the usercontrol can not AutoPostBack huobazi ASP .Net 1 07-03-2003 03:14 AM