go back to Same Point of Web Page !!!!

A

Aur_Ros

I have a very long page then with a buttom_click event I need to make
some calculation and fill a table shown in the page, the problem is
that when my page postback I start at the top of the page and I need to
scroll down to see the results!!!, Does anybody Knows how can I do to
go back to the same point where I clicked the Buttom?, any
sugestion????? Thanks !!!
 
M

Mark Fitzpatrick

Enable smartnavigation for the page. I believe there were some issues with
smartnavigation in the past, but I've never used it so I can't say exactly.
You may want to search google for smartnavigation issues before you turn it
on though.
 
A

addup

Aur_Ros said:
I have a very long page then with a buttom_click event I need to make
some calculation and fill a table shown in the page, the problem is
that when my page postback I start at the top of the page and I need to
scroll down to see the results!!!, Does anybody Knows how can I do to
go back to the same point where I clicked the Buttom?, any
sugestion????? Thanks !!!

a simple google for the term "control.focus" reveals
http://www.developer.com/net/asp/article.php/2237431
or
http://www.codeproject.com/aspnet/autopostbackfocus.asp

but you get the general idea

Hope this helps
-- a --
 
R

ReyN

hello Aur_Ros

there is a property called MaintainScrollPositionOnPostBack which you
can set to true either

1 - in the @Page directive to apply to the current Web Form

<%@ Page Language="C#" MaintainScrollPositionOnPostBack="true" %>

2 - in the pages section of the Web.config to apply to all pages in an
application

<system.web>
<pages maintainScrollPositionOnPostBack = "true" />
</system.web>
 

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

Top