Paging Problem

Results 1 to 6 of 6

Thread: Paging Problem

  1. #1
    Rupali Guest

    Default Paging Problem

    Hi,<BR> I am paging the records returned by a sql query.The problem is the query has a request queryform value which i get from a revious asp page.Since in paging i have to redirect to the same asp (self) it now cannot find the queryform value.I thought of using session but the session again has to be declared in the same page.And hence it will not get the request queryform value.<BR> Is there any way so that this problem can be solved?Can i use another asp page to show the further result page?<BR> Any help is appreciated.

  2. #2
    Christiaan Verwijs Guest

    Default RE: Paging Problem

    Instead of using a form, use the same page, but add a variable called &#039page&#039 to the URL. Simply reload the page like this:<BR><BR><BR><BR>Read the value of &#039page&#039 and show that actual recordset-page.

  3. #3
    Rupali Guest

    Default RE: Paging Problem

    Hello Christiaan ,<BR> Thanx for the response.But you didn&#039t get my problem.MAy be i was not clear.<BR> In the asp page(showresults.asp) of mine,i have a sql query which like<BR>"select * from mytable where id="+request.form("id") <BR> so far the first time it gets the request.form("id") from the previous page and it shows the resulting records.But as i go to see the next set of records , it <BR>comes to the start of the showresults.asp(calls the same page) and now it cannot get the request.form("id") as the value is lost. I can&#039t even set the sesion value.<BR> Thats the problem.<BR><BR><BR><BR>

  4. #4
    Mukund( Guest

    Default RE: Paging Problem

    I think u are try&#039n to get the results from the same page using request.form(xxx) even when the querying mechanism involved is request.querystring ..., <BR> is this wht u see on the Browser .<BR><BR> <BR>if u are using the same asp page to fetch the results for the first time and then on the same page , then u must be using ...<BR><BR>something like this ...<BR><BR>do a check to see if the query mechansim involved is form or querystring .<BR> <BR>if request.form("id")=empty then<BR> id=request.querystring("id")<BR>else<BR> id=request.form("id")<BR>end if<BR><BR>and use this id in the sql query that u are firing back at the database ..

  5. #5
    Vikram Koneri Guest

    Default RE: Paging Problem

    Hi Rupali<BR>I read all replies sent to your query.<BR>I have a small suggestion.<BR>Instead of using <BR> Request.Form("id") <BR>Simply use the <BR> Request("id")<BR>Since the Request is a collection it will correctly give u the value of Id either from the QueryString or Form.<BR><BR>But be careful that u have only copy of id in either the Forms collection or the appended to URL as Querystring.<BR><BR>Tell me if this small improvment does solve the problem.<BR><BR>Cheers<BR>

  6. #6
    Join Date
    Dec 1969

    Default RE: Paging Problem

    Hi Rupali,<BR> <BR> In the showresults.asp page of yours capture the value of the id in a hidden field.Now when you go to see the next set of records ,pass this id contained in the hidden field.I think this should solve the problem.<BR><BR>raghu

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts