Technical Summary:
Problem description: using the Repeater control to obtain records from the database, how can we obtain the records of the same generation adjacent to the previous element set or the previous Element Set (the same record )?
Code Description:
<Asp: repeater id = "repquerytomodify" runat = "server">
<Itemtemplate>
<TD class = "mystuno">
<% # Eval ("stuno") %>
</TD>
<TD>
<% # Eval ("Grade") %>
</TD>
<TD class = "modifylevelsocore">
<% # Eval ("score") %>
</TD>
</Itemtemplate>
</ASP: repeater>
You can capture the "class = modifylevelsocore" information and how to obtain the information of class = "mystuno" (in the same record)
Solution: Use the jquery language:
VaR stuno = $. Trim (objtd. siblings (". mystuno"). Text ());
VaR levelname = $. Trim (objtd. Prev (). Text ());
In this way, we can obtain the different field values in the same record we want. This technology alone solves our own problems and hopes to help our viewers solve the problems. We can also talk a lot about it, make progress together.
Summary:
I spent half a day searching for this issue on the internet yesterday. My personal opinion on finding something on the internet is that sometimes I feel that the main solutions to these problems are hidden on the Internet, I saw the same problem on the Internet, but it was depressing that so many people did not have a correct solution.
Later, I decided to start from the basics. I found the jquery manual and matched the document according to my needs. Finally, I found the solution, in fact, we can just filter out the question, so when I find the answer to the question, it seems that the technology is so simple, but when I am troubled by this question, when I tried to find the answer, it was really a pain ·····
From this point of view, I learned that I should first consider these solutions based on my own materials. If I have tried all the methods that I can think of, I 'd like to find them online, if this really involves technical issues, sometimes it may be because the technology that you are searching for is not home.
Therefore, we should also have our own wings to improve our ability to solve problems and optimize ourselves .............