473,385 Members | 1,973 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,385 software developers and data experts.

How to get Focus on one Button,if two buttons exists on the same f

Hi,
I am Ravindra,presently doing a project in asp.net.
The Login page of my Web Project consists of two Buttons.
If user enters his username and password and clicks on enter button of
keyboard,
the Signin button is to be submitted not the other button.
So,please specify how to get focus on the specified Button
Thanks in advance.
Ravindra
Oct 3 '06 #1
4 1373
If this is ASP.NET 2.0, you can group controls so the button within the
group submits when you are working with controls in that group. In version
1.1, you will have to create your own custom handler to put focus on one
button, or the other, based on user's input.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"Ravindra" <Ra******@discussions.microsoft.comwrote in message
news:B8**********************************@microsof t.com...
Hi,
I am Ravindra,presently doing a project in asp.net.
The Login page of my Web Project consists of two Buttons.
If user enters his username and password and clicks on enter button of
keyboard,
the Signin button is to be submitted not the other button.
So,please specify how to get focus on the specified Button
Thanks in advance.
Ravindra

Oct 3 '06 #2
RAvindra see this article at:-
http://www.beansoftware.com/ASP.NET-...Enter-Key.aspx
Patrick

"Ravindra" <Ra******@discussions.microsoft.comwrote in message
news:B8**********************************@microsof t.com...
Hi,
I am Ravindra,presently doing a project in asp.net.
The Login page of my Web Project consists of two Buttons.
If user enters his username and password and clicks on enter button of
keyboard,
the Signin button is to be submitted not the other button.
So,please specify how to get focus on the specified Button
Thanks in advance.
Ravindra

Oct 3 '06 #3
Thanks, wasn't aware of the defaultbutton property :)

"Patrick.O.Ige" <na********@hotmail.comschreef in bericht
news:uT**************@TK2MSFTNGP04.phx.gbl...
RAvindra see this article at:-
http://www.beansoftware.com/ASP.NET-...Enter-Key.aspx
Patrick

"Ravindra" <Ra******@discussions.microsoft.comwrote in message
news:B8**********************************@microsof t.com...
>Hi,
I am Ravindra,presently doing a project in asp.net.
The Login page of my Web Project consists of two Buttons.
If user enters his username and password and clicks on enter button of
keyboard,
the Signin button is to be submitted not the other button.
So,please specify how to get focus on the specified Button
Thanks in advance.

Ravindra


Oct 3 '06 #4
In ASP.NET 2.0 Panel controls have a new Default Button property you could
use.

Otherwise you could use this free control to solve the problem.
http://www.metabuilders.com/tools/DefaultButtons.aspx

And here are a couple good articles on the subject:
http://www.allasp.net/enterkey.aspx
http://www.aspnetpro.com/features/20...200406so_f.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Ravindra" <Ra******@discussions.microsoft.comwrote in message
news:B8**********************************@microsof t.com...
Hi,
I am Ravindra,presently doing a project in asp.net.
The Login page of my Web Project consists of two Buttons.
If user enters his username and password and clicks on enter button of
keyboard,
the Signin button is to be submitted not the other button.
So,please specify how to get focus on the specified Button
Thanks in advance.
Ravindra

Oct 3 '06 #5

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

Similar topics

2
by: Paul Thompson | last post by:
I am trying to use various javascript tools, all of which work in NN, to work in IE. Here's my latest annoyance. I get a list of all objects on a page using docContents =...
1
by: Martin Nadoll | last post by:
Hello, i have a little problem and no idea :-( i have a form with two buttons to submit it. One button (must be left) goes to a detail-page and the second button (must be right) goes to a...
7
by: Chris | last post by:
I'm using eight links listed horizontally as a menu on my site. I'm using font-variant:small-caps and they are padded so that they mimic buttons. My gripe is with the way IE handles the focus...
3
by: Philip Townsend | last post by:
I have an aspx page that contains 2 user controls, each containing a seperate textbox and button. I would like to specify that one of the buttons recieve focus when the page loads. Also, I would...
4
by: Csaba Gabor | last post by:
Up until a few weeks ago, javascript code like window.open("http://mydomain.com", "windowName"); would always bring my new or reused window to the top, with focus. Lately, Firefox (Deer park...
16
by: Stuart | last post by:
I have a page where I utilise the left and right cursor keys to change an image, also on this page is a groups of radio buttons, unfortunately when a radio button is clicked the focus for the...
1
by: ravindradonkada | last post by:
Hi, I am Ravindra,presently doing a project in asp.net. The Login page of my Web Project consists of two Buttons. If user enters his username and password and clicks on enter button of keyboard,...
4
by: akg | last post by:
Dear Friends, I have a problem. In one of my asp.net form, I have two buttons 'reset' and 'submit' and approx 20 textboxes. through javascript, I am setting focus on first textbox. What I am seeing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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,...

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.