Repeater's ItemCommand

Discussion in 'ASP .Net' started by Guest, Dec 28, 2004.

  1. Guest

    Guest Guest

    Hi every one
    This is the problem:

    I have a UserControl that contains a Repeater and a few LinkButton.
    The Repeater generate some linkButton.
    I use this control for implementing paging solution for another repeater in
    page.

    (So I have a repeater and a Usercontrol that contains repeater)

    When click the stand-alone LinkButton inside the control,
    it postback and execute page_load and then it's click event handler.
    When click the the Repeater's Generated LinkButton, it postback and only
    execute the page_load.
    It can not find and don't execute the Repeater's ItemCommand Event handler.

    I've defind the repeater's itemcommand event handler and linked the
    eventhandler in repeater's html tage like this:

    <asp:repeater id="Repeater1" OnItemCommand="Repeater1_ItemCommand"
    OnItemDataBound="Repeater1_ItemDataBound" runat="server">
    ....


    Another scenario is like this below:
    When I sort the main repeater, the repeater inside the control, lose it's
    data. I mean there is no
    linkbutton inside the repeater.
    It looks lose its data inside the viewstate.
    Because, when I put this control in another page (empty), everything is fine.

    Regards,
    Amir
     
    Guest, Dec 28, 2004
    #1
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.