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

AutoPostBack send my page back to the top, how do you fix that?

SD
Hi,

I have a asp.net (vb) that has a lot of fields and somewhere in the bottom
of the page I have a RadioButtonList with AutoPostBack set to true so we can
enable/disable other controls.

The problem is that when this happens the user is sent to the beginning of
the page and needs to scroll down, it's a pain!

How can you set a marker or how do you control this behavior so that it goes
back to where the user was before he/she clicked the button list?

Thanks for your help!

SD
Oct 3 '05 #1
2 1547
SD wrote:
Hi,

I have a asp.net (vb) that has a lot of fields and somewhere in the bottom
of the page I have a RadioButtonList with AutoPostBack set to true so we can
enable/disable other controls.

The problem is that when this happens the user is sent to the beginning of
the page and needs to scroll down, it's a pain!

How can you set a marker or how do you control this behavior so that it goes
back to where the user was before he/she clicked the button list?

Thanks for your help!

SD


You will have to use javascript to do this. I don't know the command to
jump down the page off the top of my head, but you'll have to mark each
radiobutton and then use the javascript command to make the jump.

Chris
Oct 3 '05 #2

Can you:

1) Create a Hidden Text Field.
- This will hold the field ID/Field Name that was last entered
2) Create a Javascript function that updates the value of this field
based on the Focus event of the field that you are working on
3) Create a Javascript function that Sets Focus to the HTML object
based on the information in the hidden field.
4) Load the Set Focus Javascript function in the Body onload event.

NOTE: for dropdowns, radio buttons, checkbox objects setting focus is
not as simple as Textboxes...so your function needs to be able to
handle every type objects on your page...

that should work...
--
rviray
------------------------------------------------------------------------
rviray's Profile: http://www.msusenet.com/member.php?userid=4211
View this thread: http://www.msusenet.com/t-1871095467

Oct 3 '05 #3

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

Similar topics

1
by: Vinod Kumar | last post by:
Hi All, I have a ASP.NET page with lots of web controls. Hence I have a vertical scroll bar coming (which is natural ofcourse). The problem is I have a checkbox button at the bottom of the...
3
by: Lloyd Sheen | last post by:
I have a page that works fine. I am trying to optimize the page by overriding some of the Information that is being saved in the hidden VIEWSTATE. If I make the properties of the dropdown False...
8
by: Matthew Louden | last post by:
why need to set autopostback property to be true?? I know autopostback event means to send the form to the server automatically. I tried checkbox, checkbox list, radio button, and radio button...
7
by: Ron | last post by:
Hello all, I don't understand why my pageis not posting back to the server when I change the selection on a radio list. I have a page that both accepts new personal info. or allows editing to...
2
by: rdb | last post by:
VB.NET web program with a webform w/2 dropdownlistboxes, set to AutoPostBack TRUE, selection in either dropdown fires the SelectedIndexChanged events correctly UNTIL I navigate to second webform in...
1
by: SD | last post by:
Hi, I have a asp.net (vb) that has a lot of fields and somewhere in the bottom of the page I have a RadioButtonList with AutoPostBack set to true so we can enable/disable other controls. The...
2
by: Bob Peek | last post by:
I have created a master page with a single asp:button that posts the page without page validation. On the content page, I have a variety of asp controls including text box, drop down list...
4
by: Sarita Sai Bhushan | last post by:
Hi, While I was developing a active desktop web page in ASP.Net using server controls I faced a problem with the autopostback property of server control. The sever control I used in my aspx page...
1
by: danyeungw | last post by:
I get the following from the link http://support.microsoft.com/kb/314206. I need to have both work - the page stays where it is and set focus to next control. Does anyone have solution? I have...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.