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

btnNext always gets focus

I suppose it might really be an IE problem but since I'm developing in C#
and .Net, I'm asking here.

I have an app with a couple pages that each have a button Web Server control
named btnNext. To see the button, the user has to scroll down once from the
top of the screen...or should have to. Adjacent on the page to the btnNext
button is another identical button: btnCancel.

The problem I was having is that whenever the page loaded, it automatically
scrolled down to show the btnNext button. If I disabled or deleted the
button, the page would show the top of the page on load, as desired, rather
than scrolling down. I even tried deleting btnNext and making a new one by
copying btnCancel. Same problem. btnCancel alone didn't cause the scroll.
btnNext still caused the scroll but only after I changed the name from the
default of Button1 to btnNext. What is weird that if I rename btnNext to
anything except btnNext, the problem goes away. It is the name and the
name alone that is causing the problem.

Has anyone else run across this?

Dale
Nov 18 '05 #1
2 1630
Hi

Check the following Article
http://support.microsoft.com/default...b;EN-US;316719

HTH
Ravikanth[MVP]

"DalePres" wrote:
I suppose it might really be an IE problem but since I'm developing in C#
and .Net, I'm asking here.

I have an app with a couple pages that each have a button Web Server control
named btnNext. To see the button, the user has to scroll down once from the
top of the screen...or should have to. Adjacent on the page to the btnNext
button is another identical button: btnCancel.

The problem I was having is that whenever the page loaded, it automatically
scrolled down to show the btnNext button. If I disabled or deleted the
button, the page would show the top of the page on load, as desired, rather
than scrolling down. I even tried deleting btnNext and making a new one by
copying btnCancel. Same problem. btnCancel alone didn't cause the scroll.
btnNext still caused the scroll but only after I changed the name from the
default of Button1 to btnNext. What is weird that if I rename btnNext to
anything except btnNext, the problem goes away. It is the name and the
name alone that is causing the problem.

Has anyone else run across this?

Dale

Nov 18 '05 #2
Thanks for the reply but I understand how to set the focus. What I am
trying to understand is why I need to in this case. And why just the name
of the control will make IE set the focus to it. Weird stuff.

Dale

"Ravikanth[MVP]" <Ravikanth[MVP]@discussions.microsoft.com> wrote in message
news:C4**********************************@microsof t.com...
Hi

Check the following Article
http://support.microsoft.com/default...b;EN-US;316719

HTH
Ravikanth[MVP]

"DalePres" wrote:
I suppose it might really be an IE problem but since I'm developing in C# and .Net, I'm asking here.

I have an app with a couple pages that each have a button Web Server control named btnNext. To see the button, the user has to scroll down once from the top of the screen...or should have to. Adjacent on the page to the btnNext button is another identical button: btnCancel.

The problem I was having is that whenever the page loaded, it automatically scrolled down to show the btnNext button. If I disabled or deleted the
button, the page would show the top of the page on load, as desired, rather than scrolling down. I even tried deleting btnNext and making a new one by copying btnCancel. Same problem. btnCancel alone didn't cause the scroll. btnNext still caused the scroll but only after I changed the name from the default of Button1 to btnNext. What is weird that if I rename btnNext to anything except btnNext, the problem goes away. It is the name and the
name alone that is causing the problem.

Has anyone else run across this?

Dale

Nov 18 '05 #3

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

Similar topics

2
by: Woof-Woof | last post by:
I have a problem with windows in my VB projects. My project consists of an MDI form with many child (MDIChild = TRUE) and non-child (MDIChild = FALSE) forms contained within. The problem I...
0
by: Dennis Schulz | last post by:
hi everybody, We have a problem with our MIDI-Synthesizer. After start of our programm the piano panel has keyboard focus. After mouse click in another panel (changing instruments) the keyboard...
6
by: Cortes | last post by:
Hi all, I have this parent window poping up the child window. SOmething like this popupWinA= window.open("child.html","popupWinA"," width=300 , height=150) I want this child popupWinA always...
0
by: hzgt9b | last post by:
Using visual studio .NET 2003, VB: I'm experiencing an issue with a TreeView object when it gets focus - the first root node in the tree always gets selected when the control gets focus - even if...
1
by: Michael A. Covington | last post by:
Why is it that, if there is a combo box on the main form, it gets the focus initially, regardless of which other element we have set the focus to?
1
by: guy | last post by:
Is it possible to select all text in a asp text box when it gets focus? How?
3
by: Tom | last post by:
I have a VB .NET application that has a text box with the following code to handle the leave event. Private Sub txtIDiscountRate_TextChanged(ByVal sender As System.Object, ByVal e As...
12
by: tobias.sturn | last post by:
Hi! My prof told me always to make my members private or protected cause its standard to write setter and getter methodes.. Is that in your opinion correct? Cause I dont see any adventages to...
3
by: papalarge | last post by:
I have a VB.NET application that consists of a toolbar and a subwindow that I want to function together and not independently. So when I give focus to one, I want to make sure that the other is...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.