Click here to Skip to main content
11,796,774 members (79,249 online)
Rate this: bad
Please Sign up or sign in to vote.
Welcome all:

I would like to ask you about this javascript, this is a peace of code:
                    <td id="Td2" runat="server" style="border:solid; width:inherit; border-color:white; font-size:medium;">
                        <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' />
                        <br />
                        <asp:Label ID="categoryLabel" runat="server" Text='<%# Eval("category") %>' />
and this is a DataPager for this ListView:
<asp:DataPager ID="DataPager1" runat="server" PageSize="15" >
                                        <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                        <asp:NumericPagerField />
                                        <asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />
I installed a script in the page:
<script type='text/javascript' src=''></script>
<link rel="stylesheet" type="text/css" href="scripts/ddajaxsidepanel.css" />
<script src="scripts/ddajaxsidepanel.js">
it opens a new web page in nice panel, but it requires to add the property rel="ajaxpanel" for any link you would like to open it in this panel. I added this property in the listview as you can see from the code above.

the script works fine ONLY in the first page of listview, but when you hit 2 (page two) in the DataPager it doen't work, rather, it opens the link in the same page.

you can get the script from here:[^]

please any help to make the script works for all pages in the listview would be appreciated Smile | :)
Best regards.
Posted 12-May-13 1:56am
Edited 17-May-13 12:54pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please see my recent answer: Get ListView elements into JavaScript Array[^].


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Abhinav S 379
1 OriginalGriff 360
2 Maciej Los 360
3 CPallini 295
4 KrunalRohit 280
0 OriginalGriff 2,032
1 Maciej Los 1,725
2 KrunalRohit 1,310
3 CPallini 1,055
4 ppolymorphe 883

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 17 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100