How do work smartnavigation on redirect?

  • Thread starter Thread starter Rafael Leonhardt
  • Start date Start date
R

Rafael Leonhardt

I know that smartnavigation works on formpost.
But I can to do smartnavigation works when I redirect to same page than post
the page.

Example:

Actual page is "mainpage.aspx?param=xx"
In a button click I Redirect to "mainpage.aspx?param=yy" but I want that
scroll stay on position of button.

Is possible? Who/Where save the position before formPost?
 
Rafael:
You can always use javascript to do this via window.ScrollTo()

mainpage.aspx?param=yy&toBottom=true


Sub Page_Load
if not Request.Querystring("toBottom") is nothing then
Page.RegisterStartupScript("ScrollToBottom", "<script
language='javascript'>" + System.Environment.NewLine +
"window.scrollTo(0,9999999)" + System.Environment.NewLine + "</script>");
end if


or you could use an #anchor

The best question would be "Why the heck are you redirecting to the same
page after postback?"

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
 
Back
Top