How do work smartnavigation on redirect?

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?
 
K

Karl Seguin

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!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top