473,387 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Moving down a page in code

Hi,

I'm handling a postback from an ASP.NET Checkbox and I ideally want the page
when reloaded to position itself back to where the user was. This is similar
to using the '#' in the url I think, i.e.
http://localhost/mysite/mypage.aspx#marker

Is there was way of doing this in a postback event handler?

Thanks for your help
Nov 19 '05 #1
5 1753
IIRC some browsers, like IE will do this automatically, no need to force it.
The risk is that if you pass it the value to "jump" it may re-post again.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Gravy" <Gr***@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
Hi,

I'm handling a postback from an ASP.NET Checkbox and I ideally want the
page
when reloaded to position itself back to where the user was. This is
similar
to using the '#' in the url I think, i.e.
http://localhost/mysite/mypage.aspx#marker

Is there was way of doing this in a postback event handler?

Thanks for your help

Nov 19 '05 #2
I think asp.net provides a solution for thist. Turn on smart navigation.
This is an attribute of the page directive i think. If using VS, you will
see the property in the properties window. Set it to true

"Gravy" <Gr***@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
Hi,

I'm handling a postback from an ASP.NET Checkbox and I ideally want the
page
when reloaded to position itself back to where the user was. This is
similar
to using the '#' in the url I think, i.e.
http://localhost/mysite/mypage.aspx#marker

Is there was way of doing this in a postback event handler?

Thanks for your help

Nov 19 '05 #3
The problem is identifying in the page where the user was. The browser has
no way of knowing the scroll position of the window. You might have a look
at SmartNavigations, but from what I've heard, it may or may not work.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Gravy" <Gr***@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
Hi,

I'm handling a postback from an ASP.NET Checkbox and I ideally want the
page
when reloaded to position itself back to where the user was. This is
similar
to using the '#' in the url I think, i.e.
http://localhost/mysite/mypage.aspx#marker

Is there was way of doing this in a postback event handler?

Thanks for your help

Nov 19 '05 #4
Thanks for all your input guys,

I shall check out this SmartNaviation in a short while. I've broken things a
little at the moment :-(
"Kevin Spencer" wrote:
The problem is identifying in the page where the user was. The browser has
no way of knowing the scroll position of the window. You might have a look
at SmartNavigations, but from what I've heard, it may or may not work.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Gravy" <Gr***@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
Hi,

I'm handling a postback from an ASP.NET Checkbox and I ideally want the
page
when reloaded to position itself back to where the user was. This is
similar
to using the '#' in the url I think, i.e.
http://localhost/mysite/mypage.aspx#marker

Is there was way of doing this in a postback event handler?

Thanks for your help


Nov 19 '05 #5
Cool, this works a treat. Thanks

"Gravy" wrote:
Thanks for all your input guys,

I shall check out this SmartNaviation in a short while. I've broken things a
little at the moment :-(
"Kevin Spencer" wrote:
The problem is identifying in the page where the user was. The browser has
no way of knowing the scroll position of the window. You might have a look
at SmartNavigations, but from what I've heard, it may or may not work.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Gravy" <Gr***@discussions.microsoft.com> wrote in message
news:91**********************************@microsof t.com...
Hi,

I'm handling a postback from an ASP.NET Checkbox and I ideally want the
page
when reloaded to position itself back to where the user was. This is
similar
to using the '#' in the url I think, i.e.
http://localhost/mysite/mypage.aspx#marker

Is there was way of doing this in a postback event handler?

Thanks for your help


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve Hoyer | last post by:
This page returns the error : C:\jakarta-tomcat-5.0\work\Standalone\localhost\_\tax\tax40saleshistory_jsp.java:135: illegal start of expression I have narrowed it down to <% while...
2
by: Ted | last post by:
Hello all. Its been a few years since I've been here. I hope everyone is well. I am working on a report that has several sub reports in the detail section. I have sized the sub reports to have...
4
by: Ron Mexico | last post by:
Hi, Currently have an app that maintain that is written in VB6 and uses an access db (backend db only used as a data store not writing to the db). This app is a client app not server multi-teir...
4
by: Nick Wedd | last post by:
I have a test page http://www.files.maproom.org/00/12/q/w.html which almost does what I want. The idea is that, when you hover the mouse over one of the dates near the top of the page, it...
2
by: Full Decent | last post by:
This is a design question about moving existing code into a modular design. My design is wrong and is causing me headaches. Please take a look: http://pastebin.com/502560 Thanks again, Will
2
by: rodchar | last post by:
hey all, if i select an item in a listbox, how would i move that item up/down the list using upd/down buttons on my .aspx page? thanks, rodchar
0
by: Warhorse | last post by:
Hi guys, I was wondering if it were possible for someone to look at the coding for the website I tend to (I use the term tend because I did not write the code, I only do updates for it, so while I...
7
by: =?Utf-8?B?TW9iaWxlTWFu?= | last post by:
Hello everyone: I am looking for everyone's thoughts on moving large amounts (actually, not very large, but large enough that I'm throwing exceptions using the default configurations). We're...
12
by: =?Utf-8?B?TWFyaw==?= | last post by:
I modified a C# application from Bob Powell that moves graphics primitives around on the screen into a Vb.NET 2005 application. I want to modify this application so along with moving regular...
3
by: Avi | last post by:
Hi all, I have a web page with Multiline TextBox. Every 3 seconds I refresh the page and display all received messages in this TextBox. When the TextBox is updated (The Text property is set). ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.