Retain position after postback

S

simon

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

S. Justin Gengo

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
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top