Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 5th, 2004, 11:41 AM
Authorized User
 
Join Date: Jul 2003
Location: Calgary, Alberta, Canada.
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default SmartNavigation="true"

Hey all,

I have been using the @Page paramater 'SmartNavigation' to help control page position on postbacks to prevent users from needing to scroll back to the position they were at on the page when they created the postback. The problem I am running into is that I have various elements on the page (Header, Footer, left side navaigation) being controlled and drawn by client side JavaScript. When ever I use 'SmartNavigation' on a page that uses post back I lose the page elements being drawn by the JavaScript. Have any of you encountered this before or know why this happens or even know of a work around? I have disabled the SmartNavigation at this time.

Craig
-----------------------
there is no place like 127.0.0.1
__________________
Craig
-----------------------
there is no place like 127.0.0.1
  #2 (permalink)  
Old January 5th, 2004, 12:01 PM
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

SmartNavigation is neat, but I have also had it cause problems. It uses this method of implementing some iframes and a bunch of javascript. It think what it's actually doing is posting the page to the hidden iframe, then taking the result and repainting the visible window with it. If you watch closely you'll actually see 2 or 3 page requests being made in the browser. It's black magic to me!

I've noticed that sometimes a page doesn't give me that "This page requires a re-post" prompt when I refresh or go back or forward. It's strange. I found that it was being caused by smart nav.

I create this method before I realized what smart navigation was. Add 2 hidden form fields to the form, and write the current page position (scrollTop and scrollLeft) to those fields in the body onScroll handler. Then when the page is posted back you can grab those values in the ASPX code and write a bit of javascript to SET those values when the page loads in the client. One drawback to this is that you don't get the focus back on the current control like in SmartNavigation. However, there is one major advantage to this method, even though it's not as "pretty" as SmartNavigation: it works in other browsers. When SmartNav is on, you only get it in I.E. (at least from what I have seen).

Peter
------------------------------------------------------
Work smarter, not harder.
  #3 (permalink)  
Old September 3rd, 2004, 01:29 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Could you post the source of the javascript that you are using.
It would be very useful.

Thx

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
smartNavigation problems geofbirchall ASP.NET 1.0 and 1.1 Basics 1 March 16th, 2005 11:18 AM
Move to the next control using SmartNavigation katsarosj ASP.NET 1.0 and 1.1 Basics 3 February 5th, 2004 04:35 PM
Stupid but true Adam H-W SQL Server 2000 3 December 6th, 2003 12:16 PM
SmartNavigation and Screen Flicker Jan_Ma ASP.NET 1.0 and 1.1 Basics 0 June 28th, 2003 08:37 PM
SmartNavigation and screen flickers Jan_Ma ASP.NET 1.x and 2.0 Application Design 0 June 28th, 2003 08:35 PM



All times are GMT -4. The time now is 06:01 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.