DataList UserControl Load Dynamically

Discussion in 'ASP .Net' started by =?Utf-8?B?UmljaGFyZCBTdGVlbGU=?=, Dec 20, 2005.

  1. 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",
    "{0:d}")%>
    </ItemTemplate>

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

    can any suggest a workaround for this
    Thanks






    --
    Thanks
    Richard
     
    =?Utf-8?B?UmljaGFyZCBTdGVlbGU=?=, Dec 20, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. huobazi
    Replies:
    1
    Views:
    740
    David Waz...
    Jul 3, 2003
  2. Nevyn Twyll
    Replies:
    8
    Views:
    1,963
  3. Replies:
    2
    Views:
    2,985
  4. Stan SR

    load dynamically UserControl

    Stan SR, Oct 4, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    349
    bruce barker \(sqlwork.com\)
    Oct 4, 2006
  5. Replies:
    3
    Views:
    3,805
    Arthur
    Jun 23, 2008
Loading...

Share This Page