Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 23rd, 2004, 05:25 AM
Authorized User
 
Join Date: Feb 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mahulda
Default Control Focus of Page

I have a Login Page where Instead of a text box for User Names, I have a dropdownlsit containning the list of users( thats becauseI have a limited & fiexed no. of users)
The DropDownList is the First Control of the Page.
Then there is a textbox for filling in Password.
And Finally a Button for Logging in.

When A User Selects his username from the list , Fills in his password in the Textbox and Presses Enter Nothing happens.

Instead Of Pressing Enter if he presses tab and Shifts the focus to the Button and then Pressses Enter, Everything works Fine.

Is there any way that the Login is executed when Enter is pressed in the first case

__________________
-.. -..
 
Old July 23rd, 2004, 08:52 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The problem is that when you press enter in the password box, you aren't pressing the button. Presumably you are performing the login action when you click the button.

You might try having the login process happen when the password textbox "OnChange" event fires. Seeing as this is a password box (and always starts out blank), the OnChange event should always fire (I hope).

Otherwise you could trap the enter key on the password box. There is a recent thread about this.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't move focus to control <control scptech Access VBA 8 October 26th, 2007 12:16 PM
Determining control that has focus in jscript Bill999 .NET Framework 2.0 1 January 31st, 2007 02:49 PM
Set focus on web control vivekshah ASP.NET 1.0 and 1.1 Professional 1 June 18th, 2006 11:55 PM
Can't get focus on user control drb2k2 C# 2 December 15th, 2004 12:51 PM
Setting focus to a web control textbox? hilda ASP.NET 1.0 and 1.1 Basics 2 November 1st, 2003 11:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.