Paginating XML Result Programming Software Development by ajwei810192 …] I am trying to use this to use as a paginating system, is there anything else I need to do here… Cache PHP page that has paginating Programming Web Development by Moderns …'s different for each session user. For example if the paginating is used and if I have 10 pages each page… Re: Cache PHP page that has paginating Programming Web Development by LastMitch …'s different for each session user. For example if the paginating is used and if I have 10 pages each page… Paginating Query Results Programming Web Development by SunnySideUp Hi, I am trying to Paginate Query Results. The values are passed through a form allowing users to search a database based on certain criteria they select. Now I got two problems though, 1) I can't get all the results from the database(as not all the criteria is working) ? 2) If there is more than 1 page, the next page does not carry over … Re: Paginating Query Results Programming Web Development by FlashCreations Have you tried an OOP approach. I use an OOP paginator on my site, and I usually find OOP much easier to use. Why not try creating a class to hold a result and then create an array of the result objects. You can figure page numbers by using [icode]ceil(count($resultArray)/$itemsPerPage)[/icode]. If you wish to take this approach, I can write a … Re: Paginating Query Results Programming Web Development by SunnySideUp Hi, Thanks for your reply, If you could write a simple pagination class for me to take a look at that would be much appreciated. Thanks Re: Paginating Query Results Programming Web Development by FlashCreations Alright here's a little example. Simply create an instance of pmcPagination and call [icode]$instance->add();[/icode] with the only argument being an instance of [icode]paginationData()[/icode] with one data entry to be included in the pagination or an array of these instances. To show the page call [icode]$instance->paginate()[/icode]. You … Paginating Pdfs in Servlets Programming Web Development by sbhavan Hi everyone, I have a task to generate reports in my project. I am using JasperReports for the reporting purpose and generating the reports using servlets. The reports should be generated and displayed as pdf file in the client's browser window. Now every thing is working fine except the no of pages of the pdf increases huge. So I decided … Re: Paginating Pdfs in Servlets Programming Web Development by jwenting Check your pdf generation library. Most will have options for pagination and other sectioning. Paginating XML Result in ASP Programming Web Development by ajwei810192 Hi, I have an application as in the following, [CODE] <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.XML" %> <script runat="server"> Sub submit(ByVal sender As Object, ByVal e As EventArgs) songNodesOut.Text = String.Empty If Page.IsPostBack Then… Re: Paginating XML Result in ASP Programming Web Development by kdion1024 This is not that difficult of a task. The first thing I would do on the page is calculate the number of "pages" you have with your data: [CODE] Dim RecordsPerPage As Integer = 10 Dim TotalPageCount As Integer = songList.Count \ RecordsPerPage If songList.Count Mod RecordsPerPage > 0 Then TotalPageCount += 1 [/CODE] You need … Re: Paginating XML Result in ASP Programming Web Development by ajwei810192 [QUOTE=kdion1024;1249164]This is not that difficult of a task. The first thing I would do on the page is calculate the number of "pages" you have with your data: [CODE] Dim RecordsPerPage As Integer = 10 Dim TotalPageCount As Integer = songList.Count \ RecordsPerPage If songList.Count Mod RecordsPerPage > 0 Then TotalPageCount … Re: Paginating XML Result in ASP Programming Web Development by kdion1024 Found a small typo in your code. Right before the main for loop remove this entire line: [COLOR="red"]For song As XmlNode[/COLOR] Let me know. I hope that works. I apologize as I didn't have time to create a whole test project. Thanks, Kenny Re: Paginating XML Result in ASP Programming Web Development by kdion1024 Actually, that should have just been changed to a Dim statement. Change For song As XmlNode TO Dim song As XmlNode Kenny Re: Paginating XML Result in ASP Programming Web Development by ajwei810192 [QUOTE=kdion1024;1249234]Actually, that should have just been changed to a Dim statement. Change For song As XmlNode TO Dim song As XmlNode Kenny[/QUOTE] Thanks, and I have updated the code to the following: [CODE] <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.XML" %> <… Re: Paginating XML Result in ASP Programming Web Development by kdion1024 Can you send me the xml file? kdion at kdion dot com I would like to actually step through the code using your file. Thanks, Kenny Re: Paginating XML Result in ASP Programming Web Development by ajwei810192 Hi, Looks like I fixed the problem I was mentioning earlier by fixing the code. [CODE]<%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.XML" %> <script runat="server"> Sub submit(ByVal sender As Object, ByVal e As EventArgs) songNodesOut.Text = "&… Re: Paginating XML Result in ASP Programming Web Development by kdion1024 The navigation is really up to you however you want it. You could do several things. If you are never going to have very many pages you can genrate links to each of the pages. [CODE] Dim NavigationHTML As String For i As Integer = 1 To TotalPageCount NavigationHTML &= "<a href=""mainPage.aspx?Page=&… Re: Paginating XML Result in ASP Programming Web Development by ajwei810192 [QUOTE=kdion1024;1249473]The navigation is really up to you however you want it. You could do several things. If you are never going to have very many pages you can genrate links to each of the pages. [CODE] Dim NavigationHTML As String For i As Integer = 1 To TotalPageCount NavigationHTML &= "<a href="&… Re: Paginating XML Result in ASP Programming Web Development by kdion1024 First add a Literal control to the HTML where you want the navigation to show up [CODE] <asp:Literal ID="navHTML" runat="server"></asp:Literal> [/CODE] Then somewhere after the calculations add the navigation code I gave you earlier. Right after that code you can populate the navigation html with: [CODE] … Re: Paginating XML Result in ASP Programming Web Development by ajwei810192 [QUOTE=kdion1024;1249492]First add a Literal control to the HTML where you want the navigation to show up [CODE] <asp:Literal ID="navHTML" runat="server"></asp:Literal> [/CODE] Then somewhere after the calculations add the navigation code I gave you earlier. Right after that code you can populate the navigation … Re: Paginating XML Result in ASP Programming Web Development by kdion1024 Not sure I follow. Are you saying it is always showing the first "page" (records 1 to 10)? Re: Paginating XML Result in ASP Programming Web Development by ajwei810192 [QUOTE=kdion1024;1249536]Not sure I follow. Are you saying it is always showing the first "page" (records 1 to 10)?[/QUOTE] Nope, say this is the navigation, [1] 2 3 4 5 and I select 2 to see page 2 's results, I get this on the browser url: [url]http://localhost/asp_test/test.aspx?Page=2[/url] And, this is what I get in the… Re: Paginating XML Result in ASP Programming Web Development by kdion1024 I can't get your sample to work on my own server but I believe this is an issue of your combo box. The code I gave you to generate the navigation is generating links directly to the page which I would guess is making you lose your selection. You could change the href on the links to actually perform a post back. Javascript would be required to be … Re: Paginating XML Result in ASP Programming Web Development by ajwei810192 [QUOTE=kdion1024;1249610]I can't get your sample to work on my own server but I believe this is an issue of your combo box. The code I gave you to generate the navigation is generating links directly to the page which I would guess is making you lose your selection. You could change the href on the links to actually perform a post back. Javascript … Re: Paginating XML Result in ASP Programming Web Development by kdion1024 It may very well be the XmlNodeList object is not zero based as I assumed. you would want this in that case: [CODE] If EndRecord > songList.Count Then EndRecord = songList.Count [/CODE] I do not want to come across as rude or insulting your inteligence but I feel your experience level may make this task a little difficult to take on. … Re: Paginating XML Result in ASP Programming Web Development by ajwei810192 Still get Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to … Re: Paginating XML Result in ASP Programming Web Development by kdion1024 Got it. I'll let you know. Thanks, Kenny Re: Paginating XML Result in ASP Programming Web Development by kdion1024 Here is the code I modified and believe it will work as you need now. I've made the following changes: 1) Keep track of the value of the Drop Down with a session variable so that the proper selection is still in place when a navigation link is clicked. Since they do not perform a postback. 2) Added an ACTION property to your form tag. Pointed… Re: Paginating XML Result in ASP Programming Web Development by ajwei810192 [QUOTE=kdion1024;1250399]Here is the code I modified and believe it will work as you need now. I've made the following changes: 1) Keep track of the value of the Drop Down with a session variable so that the proper selection is still in place when a navigation link is clicked. Since they do not perform a postback. 2) Added an ACTION property …