Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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
  #1 (permalink)  
Old April 21st, 2004, 07:11 AM
Authorized User
 
Join Date: Feb 2004
Location: Delhi, Delhi, India.
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mahulda
Default Page Reloading

My page size is larger than the vertical screen limit .
Every time the page Postbacks, the Screen displays the Top of the
Page.
Instead I would like the page to reload to that position of the page
which was earlier on display.
How can It be Done ?

Second Question -
How Can I programatically force a page to reload/postback ?

__________________
-.. -..
  #2 (permalink)  
Old April 21st, 2004, 08:38 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Either enable SmartNavigation on your page or using javascript/vbscript to set the focus to the current control on postback.

J
  #3 (permalink)  
Old April 21st, 2004, 09:06 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Question 2:

You need to have some client-side event cause a postback. What did you have in mind? What do you mean by "programatically force"?

Peter
-------------------------
Work smarter, not harder
  #4 (permalink)  
Old April 21st, 2004, 09:06 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In JavaScript, try using:

   window.scrollTo(x-coord, y-coord)


Your x and Y would have to be set to the coordinates in the page that you would like to go back to.


  #5 (permalink)  
Old April 21st, 2004, 10:06 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

For 1st one, u should save ur location area I mean ur label (<a>) Then use it in onload event, work a lottle sure u'll find out it.
And about Second put a button as a WebControl. By clicking that page will postback.

Always:),
Hovik Melkomian.
  #6 (permalink)  
Old April 21st, 2004, 10:22 AM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Here are some ideas of what you're trying to do, I think....

Code:
//postback with JavaScript
document.forms.your_form_id.submit();

//reload with JavaScript
window.history.go(0);
Is this what you're looking for?

Snib

<><


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reloading page with Ctrl+F5 aliirfan84 ASP.NET 2.0 Professional 1 October 10th, 2007 07:19 AM
AJAX problem - the whole page is reloading geoko Ajax 1 June 7th, 2006 01:39 PM
reloading a page hubbe ASP.NET 1.0 and 1.1 Basics 0 April 13th, 2006 01:46 PM
Reloading page when option selected in dropdown chandrasekhar200 Beginning PHP 1 March 10th, 2006 04:52 AM





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