Long forms repaint from top when server side controls get processe

N

Networxpro

Whenever an ASP.NET server-side control is processed, the client form is
repainted from the top forcing users to scroll back to where they were on
long forms. How can I work around this issue?
 
N

Networxpro

Networxpro said:
Whenever an ASP.NET server-side control is processed, the client form is
repainted from the top forcing users to scroll back to where they were on
long forms. How can I work around this issue?

For example run this, scroll down and click the left check box:

<%@ Page Language=vb %>
<html>
<script runat=server>
Sub Test(ByVal sender As System.Object, ByVal e As System.EventArgs)
Box2.Checked = Box1.Checked
End Sub
</script>

<body>
<form id="Form1" method="post" runat="server">
<TABLE>
<TR><TD height=1500 bgcolor=red></TD></TR>
<TR>
<TD>
<asp:CheckBox id=Box1 runat="server" AutoPostBack=True
OnCheckedChanged=Test></asp:CheckBox>
</TD>
<TD>
<asp:CheckBox id=Box2 runat="server"></asp:CheckBox>
</TD>
</TR>
</TABLE>
</form>
</body>
</html>
 
B

Bob Barrows [MVP]

There was no way for you to know it (except maybe by browsing through some
of the previous questions in this newsgroup before posting yours - always a
recommended practice) , but this is a classic asp newsgroup. ASP.Net bears
very little resemblance to classic ASP so, while you may be lucky enough to
find a dotnet-knowledgeable person here who can answer your question, you
can eliminate the luck factor by posting your question to a group where
those dotnet-knowledgeable people hang out. I suggest
microsoft.public.dotnet.framework.aspnet or the forums at www.asp.net.

I see several options:
1. Stop using data input elements to trigger server-side actions
2. Use AJAX
3. Cache the parts of the page that don't change during postbacks
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top