473,324 Members | 2,196 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,324 software developers and data experts.

Retain position after postback

I have repeater control with id="repeater1"

So I write befor the repeater control anhor tag:
<a name="repeater1"></a>

and this script at the end of the page:

<script runat="server">
location.href="#<%=request.form[_EVENTTARGET]%>";"
</script>

This should retain the position after postBack.
It don't work, I get an error in line with location.href:

Declaration expected

Does anybody know why?
Nov 18 '05 #1
1 1497
Simon,

Try this the easy way first. In the document properties set smartNavigation
to True.

But test it extensively. It can be buggy, but it works for most of my apps.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"simon" <si*********@stud-moderna.si> wrote in message
news:Oz**************@TK2MSFTNGP10.phx.gbl...
I have repeater control with id="repeater1"

So I write befor the repeater control anhor tag:
<a name="repeater1"></a>

and this script at the end of the page:

<script runat="server">
location.href="#<%=request.form[_EVENTTARGET]%>";"
</script>

This should retain the position after postBack.
It don't work, I get an error in line with location.href:

Declaration expected

Does anybody know why?

Nov 18 '05 #2

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

Similar topics

8
by: ed | last post by:
Does anyone know if ASP.NET 2.0 is going to incorporate "maintain scroll position on postback" in non-IE browsers like Firefox? This seems like an often requested feature on these newsgroups...
3
by: Rod | last post by:
I have an asp.net application where some of the interaction with the user is through modal dialog windows. This works very well except for the annoying fact that the dialog window always returns...
3
by: Karl | last post by:
Hi there, I am using asp.net with c#. I created a web user control "MyControl". When I click a button, page creates an instance of "MyControl" and loads it at run time. It is good. And the...
6
by: KathyB | last post by:
Hi, On Page Load (if not postback), the user selects a choice from dropdownlist1. On SelectedItemChanged for dropdownlist1, dropdownlist2 is populated and the user selects an item. I...
5
by: JezB | last post by:
There are a few references on the net about how to restore a page's scroll position over a postback. This is a simple one which works for me: eg....
3
by: the friendly display name | last post by:
I have on a site some very populated listboxes, now, when the user scrolls the listbox to chose some items, and then clicks a button, thus, a postback starts, the scoll position of the listbox is...
1
by: RSH | last post by:
Hi, I am experimenting with the Viewstate and based on a few articles I have read, I put together a test. it is a simple test where I am dynamically creating a DropDownList that contains 25000...
7
by: Lit | last post by:
Hi, How can I capture the vertical scroll bar position for a Listbox. I have a Listbox of 100 items + when I click on it I post back remove the item selected. After returning to the client...
1
by: srinivasyadavkota | last post by:
Hello experts here, plz help me, When I Scroll down my web page using vertical scroll bar to some point and when refreshed, I was unable to retain back the scrolled position, instead it always...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.