(ASP.NET) Problem with a repeater nested in a repeater, how to know when it is a itemCommand?

Posted by NoProblemBabe on Stack Overflow See other posts from Stack Overflow or by NoProblemBabe
Published on 2010-03-22T18:55:34Z Indexed on 2010/03/22 19:01 UTC
Read the original article Hit count: 344

Filed under:
|
|

I have the following problem:
Keeping in mind the following structure:

<repeater>
    <updatepanel>
      <div>
         <link id="fatherLink" />
      </div>
      <div>
         <repeater>
            <link id="childLink"/>
         </repeater>
      <div>
   </updatepanel>
</repeater>

right?

I am using updatepanel, so, when i click in the fatherlink, i put a click method in the server side, so it populates it's child repeater. no problems in there, but I need that the childLink to perform a action on the server side, like take in account some data and then sending to a given page to do something else.

When doing this I happen to notice that there are three situations:
1 - First server call, is not a postback it populates the father repeater (no problems here).
2 - Second server call, when the father link is clicked i populate the child repeater. Something like a "fatherLink_Click" function (no problems here).
3 - Third server call, when the child is clicked: i can't seem to know that it is the child's item command, so i can't stop it from databinding all over again, which kills my itemcommand event... (the problem).

What can I do?

© Stack Overflow or respective owner

Related posts about aps.net

Related posts about c#