returning to same place on long page
-
I'm developing in apsx.net and vb.net 2005. I have 3 pages in my application that are longer than one viewing screen, causing the uwser to scroll to update and see data down the page. The first is of static size, that is the actual page size does not change, there is just a lot of information on the page and the user needs to be able to see all and make changes before processing. The other two pages are dynamic in nature based on choices that the client makes. The problem I'm having is that each time the user makes a change that required him to scroll down the page, when the page refreshes, it returns to the top, forcing the user to scroll back down the page to see the affect of his changes. How do I get the page to refresh with the same view the user had when the change was made. Thanks in advance for your assistance.. Chuck..
-
I'm developing in apsx.net and vb.net 2005. I have 3 pages in my application that are longer than one viewing screen, causing the uwser to scroll to update and see data down the page. The first is of static size, that is the actual page size does not change, there is just a lot of information on the page and the user needs to be able to see all and make changes before processing. The other two pages are dynamic in nature based on choices that the client makes. The problem I'm having is that each time the user makes a change that required him to scroll down the page, when the page refreshes, it returns to the top, forcing the user to scroll back down the page to see the affect of his changes. How do I get the page to refresh with the same view the user had when the change was made. Thanks in advance for your assistance.. Chuck..
Anchor tag is your friend. Look at the named anchor tag. When you post to the page, pass the anchor tag and the page will scroll (automagically) on refresh. Anchor Tag Help[^]
Yusuf May I help you?
-
Anchor tag is your friend. Look at the named anchor tag. When you post to the page, pass the anchor tag and the page will scroll (automagically) on refresh. Anchor Tag Help[^]
Yusuf May I help you?
Thanks for the start.. I have 2 followup questions: 1) does that mean I have to put 'a name="[name of field]"' on every field that can be updated, including the dynamic fields? 2) how is the reference invoked upon refresh, please show code snippet? Thanks again.. Chuck..
-
Thanks for the start.. I have 2 followup questions: 1) does that mean I have to put 'a name="[name of field]"' on every field that can be updated, including the dynamic fields? 2) how is the reference invoked upon refresh, please show code snippet? Thanks again.. Chuck..
Ok, the general notion is that you add named anchor tags to your page, say something like
<a NAME="ID218395" HREF="#"><a>
notice the title for the anchor tag is blank, so it can not be seen by the user. If you want to be click-able then give it a title<a NAME="ID218395" HREF="#">My Cool Link<a>
now call the page asmyCoolPage.aspx#ID218395
that is all.Yusuf May I help you?
-
Ok, the general notion is that you add named anchor tags to your page, say something like
<a NAME="ID218395" HREF="#"><a>
notice the title for the anchor tag is blank, so it can not be seen by the user. If you want to be click-able then give it a title<a NAME="ID218395" HREF="#">My Cool Link<a>
now call the page asmyCoolPage.aspx#ID218395
that is all.Yusuf May I help you?
I have the same prblems with my long page, pls is there no way other than using the anchor tags? thanks.
-
I have the same prblems with my long page, pls is there no way other than using the anchor tags? thanks.
Enobong Adahada wrote:
I have the same prblems
what is your prblems problems. speak up (properly) and you may be heard. What is wrong with the named anchor tag. I use it on very long page and a have plenty sprinkled though out the page.
Yusuf May I help you?
-
Ok, the general notion is that you add named anchor tags to your page, say something like
<a NAME="ID218395" HREF="#"><a>
notice the title for the anchor tag is blank, so it can not be seen by the user. If you want to be click-able then give it a title<a NAME="ID218395" HREF="#">My Cool Link<a>
now call the page asmyCoolPage.aspx#ID218395
that is all.Yusuf May I help you?
Yusuf, this looks like something that will really work for me. First I have never used anchors before so there a little be of confusion here on my part. This is an asp.net with vb.net as the code behind. So when something is changed that causes a postback then the code behind is invoked. How do I activate the anchor location so when the page is redisplayed it envokes the target anchor because there will be at least 20 anchors on each page? So just to be clear I don't have a problem with creating a hundred anchors if necessary, it is just how to activate the appropiate anchor. If for example an entry from the travel dropdownlist is selected I will need to process the selection then redisplay the page. Upon selecting the dropdownlist theI will need to know its anchor. After exceuting the AutoPostBack routine I will want to return to the anchor for that dropdownlist location. I hope I am not making this too complicated. Thanks again.. Chuck..
-
Yusuf, this looks like something that will really work for me. First I have never used anchors before so there a little be of confusion here on my part. This is an asp.net with vb.net as the code behind. So when something is changed that causes a postback then the code behind is invoked. How do I activate the anchor location so when the page is redisplayed it envokes the target anchor because there will be at least 20 anchors on each page? So just to be clear I don't have a problem with creating a hundred anchors if necessary, it is just how to activate the appropiate anchor. If for example an entry from the travel dropdownlist is selected I will need to process the selection then redisplay the page. Upon selecting the dropdownlist theI will need to know its anchor. After exceuting the AutoPostBack routine I will want to return to the anchor for that dropdownlist location. I hope I am not making this too complicated. Thanks again.. Chuck..
MacIntyre wrote:
First I have never used anchors before so there a little be of confusion here on my part.
Chris, don't feel bad. We're all there one day or another. We'd to start from zero.
MacIntyre wrote:
No matter what you are using, behind the scene, it will spit out HTML code. So, you need to hone your HTML knowledge. Anchor tags are one example.
MacIntyre wrote:
How do I activate the anchor location so when the page is redisplayed it envokes the target anchor because there will be at least 20 anchors on each page?
Well, what is causing the page refresh? Is it button click? or other user action? If it is button click then you need to add the anchored tag to your Response.Redirect() page. If you give us some more detail about your code we may help you.
Yusuf May I help you?
-
I'm developing in apsx.net and vb.net 2005. I have 3 pages in my application that are longer than one viewing screen, causing the uwser to scroll to update and see data down the page. The first is of static size, that is the actual page size does not change, there is just a lot of information on the page and the user needs to be able to see all and make changes before processing. The other two pages are dynamic in nature based on choices that the client makes. The problem I'm having is that each time the user makes a change that required him to scroll down the page, when the page refreshes, it returns to the top, forcing the user to scroll back down the page to see the affect of his changes. How do I get the page to refresh with the same view the user had when the change was made. Thanks in advance for your assistance.. Chuck..
MaintainScrollPositionOnPostBack[^] return the user to the same position in the client browser after postback.
I know the language. I've read a book. - _Madmatt
-
Anchor tag is your friend. Look at the named anchor tag. When you post to the page, pass the anchor tag and the page will scroll (automagically) on refresh. Anchor Tag Help[^]
Yusuf May I help you?
Yusuf wrote:
Anchor tag is your friend
Not in this situation. It is a cumbersome and unmaintainable mechanism for this usage
I know the language. I've read a book. - _Madmatt
-
Yusuf, this looks like something that will really work for me. First I have never used anchors before so there a little be of confusion here on my part. This is an asp.net with vb.net as the code behind. So when something is changed that causes a postback then the code behind is invoked. How do I activate the anchor location so when the page is redisplayed it envokes the target anchor because there will be at least 20 anchors on each page? So just to be clear I don't have a problem with creating a hundred anchors if necessary, it is just how to activate the appropiate anchor. If for example an entry from the travel dropdownlist is selected I will need to process the selection then redisplay the page. Upon selecting the dropdownlist theI will need to know its anchor. After exceuting the AutoPostBack routine I will want to return to the anchor for that dropdownlist location. I hope I am not making this too complicated. Thanks again.. Chuck..
MacIntyre wrote:
looks like something that will really work for me.
I wouldn't use it. It is cumbersome and unmaintainable.
I know the language. I've read a book. - _Madmatt
-
MaintainScrollPositionOnPostBack[^] return the user to the same position in the client browser after postback.
I know the language. I've read a book. - _Madmatt
Damn classic asp. You are right. I have being working on the classic asp lately and my memory is filled with that filth
Yusuf May I help you?
-
Yusuf, this looks like something that will really work for me. First I have never used anchors before so there a little be of confusion here on my part. This is an asp.net with vb.net as the code behind. So when something is changed that causes a postback then the code behind is invoked. How do I activate the anchor location so when the page is redisplayed it envokes the target anchor because there will be at least 20 anchors on each page? So just to be clear I don't have a problem with creating a hundred anchors if necessary, it is just how to activate the appropiate anchor. If for example an entry from the travel dropdownlist is selected I will need to process the selection then redisplay the page. Upon selecting the dropdownlist theI will need to know its anchor. After exceuting the AutoPostBack routine I will want to return to the anchor for that dropdownlist location. I hope I am not making this too complicated. Thanks again.. Chuck..
Chris, forget I told you, go with Mark's suggestions http://www.codeproject.com/Messages/3477022/Re-returning-to-same-place-on-long-page.aspx[^] My mind is clattered with the old classic asp filth. Sorry for the mess.
Yusuf May I help you?
-
I'm developing in apsx.net and vb.net 2005. I have 3 pages in my application that are longer than one viewing screen, causing the uwser to scroll to update and see data down the page. The first is of static size, that is the actual page size does not change, there is just a lot of information on the page and the user needs to be able to see all and make changes before processing. The other two pages are dynamic in nature based on choices that the client makes. The problem I'm having is that each time the user makes a change that required him to scroll down the page, when the page refreshes, it returns to the top, forcing the user to scroll back down the page to see the affect of his changes. How do I get the page to refresh with the same view the user had when the change was made. Thanks in advance for your assistance.. Chuck..
pls i have this code protected void Page_PreLoad(object sender, EventArgs e) { MaintainScrollPositionOnPostBack = true; } but the page still scrolls up when i click a button. pls help.
-
MaintainScrollPositionOnPostBack[^] return the user to the same position in the client browser after postback.
I know the language. I've read a book. - _Madmatt
Ok, so we have been through that exercise and discovered that for implementing asp.net that it is not practical to do this. What is a more practical solution, remembering that this is webforms? We are talking the use of both buttons and dropdownlists and exiting from fields that have changed.. Thanks again..
-
MaintainScrollPositionOnPostBack[^] return the user to the same position in the client browser after postback.
I know the language. I've read a book. - _Madmatt
-
So will this work with all types of returns, field changes, button clicks and changes in dropdownlists?
Have you read the documentation?
I know the language. I've read a book. - _Madmatt
-
Have you read the documentation?
I know the language. I've read a book. - _Madmatt
-
pls i have this code protected void Page_PreLoad(object sender, EventArgs e) { MaintainScrollPositionOnPostBack = true; } but the page still scrolls up when i click a button. pls help.
-
MaintainScrollPositionOnPostBack[^] return the user to the same position in the client browser after postback.
I know the language. I've read a book. - _Madmatt