Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 5th, 2007, 11:01 AM
Authorized User
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to move to a certain page in a bound table

Hi there, I have a bound control <TABLE> on my screen. When the user edits a row on the list, I open up a window for user to edit. Then user will hit OK, and the edit window closes. The list will then refresh so that the user's change will be viewable. However, when the list refreshes, the list goes back to the very first row. If the user has scrolled through a few pages and say edits the 5th row on the 7th page (those scroll butons are also bound so all it does is calling NextPage), how can the screen go back to the 7th page automatically after it refreshes?

Thanks.
CC
 
Old June 15th, 2007, 04:20 PM
Authorized User
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I thought it's a really simple thing and yet I couldn't do it... Anyone that can help at all? Thanks

 
Old June 15th, 2007, 05:24 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Is this a Classic ASP question??? It sounds like a .NET question.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old June 15th, 2007, 05:34 PM
Authorized User
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi dparsons, definitely not .net - I haven't even used .net before. I'm using classic asp technology, no .net at work at all.

 
Old June 17th, 2007, 12:06 PM
Registered User
 
Join Date: May 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Banksie
Default

Im guessing you could send a hidden variable (using a form) when they click update, telling the opened page what page they were on, then when they press ok, the hidden variable is sent back telling the table to go to page 7.

If it uses a querystring then this method could work, because you could request.querystring("pageno") = ASPVariable
then when they press ok, its a form, that has this init, <input name="postback" type="hidden" value="1"> and <input name="pagenumber" type="hidden" value=" & ASPVariable & ">
then you could place at the top of the main tables page you could have something like this..

<% if request.form("postback")= 1 then
request.form("pagenumber") = ASPVariable2
Response.Redirect "?page=table&pageno= & ASPVariable2 & "
end if %>

Im not sure if that would work, but its an idea... im not a very advanced asp coder my self, so im not even sure if that would work to be honest, but if it does them gives a email at ,
thanks

Banksie

Last edited by Banksie; August 17th, 2013 at 09:40 AM.. Reason: remove email
 
Old June 18th, 2007, 10:42 AM
Authorized User
 
Join Date: Nov 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Banksie,
Actually the asp page contains the bound table, so the table cannot be manipulated the way you mentioned I believe.

Even if I accept your parameters such as
dim a
a = request.querystring("pageno")

it is what I do with this variable a that is the problem. I have to tell the ADO record set to go to page "x" (as defined by the variable a), and I don't know if that means I have to call table.nextPage() x times or if there is simply one ADO method call that would do the trick.

The thing is if I do a for loop for x times of NextPage(), there may be some flickering on the screen - not to imagine if the user is on page 987 - then I would have to call NextPage() 987 times and I am worried the user will faint from watching all the cell refresh on the screen.....

Thanks
CC






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to move rows in a table bucky483 Javascript How-To 10 March 27th, 2017 12:57 AM
Slow move to last page mateenmohd Access 9 June 16th, 2008 07:24 AM
move record to another table in same DB Dejitan Classic ASP Basics 2 January 3rd, 2007 07:50 AM
loop value move to table mateenmohd Classic ASP Basics 9 August 21st, 2005 06:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.