By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,191 Members | 1,064 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,191 IT Pros & Developers. It's quick & easy.

btnNext always gets focus

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.