Viewstate lose data

Discussion in 'ASP .Net Web Controls' started by Amir, Dec 28, 2004.

  1. Amir

    Amir 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
     
    Amir, Dec 28, 2004
    #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. Gerald Klein

    Whay do I lose viewstate in my usercontrol

    Gerald Klein, Jan 24, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    422
    Gerald Klein
    Jan 24, 2004
  2. Vinodh Kumar P

    About possible data lose warning

    Vinodh Kumar P, Dec 8, 2004, in forum: C++
    Replies:
    9
    Views:
    371
    Victor Bazarov
    Dec 9, 2004
  3. gnewsgroup
    Replies:
    2
    Views:
    538
    gnewsgroup
    Oct 31, 2007
  4. Amir

    DG lose viewstate

    Amir, Oct 15, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    138
  5. bthumber

    FileUpload Control lose data with any postback

    bthumber, Jul 16, 2010, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    1,706
    bthumber
    Jul 16, 2010
Loading...

Share This Page