Retain position after postback

  • Thread starter Thread starter simon
  • Start date Start date
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?
 
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
 
Back
Top