Solved

Enter Key on ASP.Net Forms

Posted on 2006-07-07
4
178 Views
Last Modified: 2010-04-06
How can i use Enter Key on ASP.Net forms

Rgds,
Sohrab
0
Comment
Question by:sohrabus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 15

Expert Comment

by:deepaknet
ID: 17057517
You need to trap the KeyPress for KeyCode 13 and trigger the appropriate button click.
0
 
LVL 15

Expert Comment

by:deepaknet
ID: 17057529
0
 
LVL 35

Accepted Solution

by:
YZlat earned 50 total points
ID: 17058198
you'll have to use javascript. Call this function on KeyDown event to check what key was pressed

function CaptureKeys() {
      if (event.keyCode == 13) {
            //your code here
      }
}
0
 

Author Comment

by:sohrabus
ID: 17070554
in VB.Net DeskTop Appl.
i set forms KeyPreview Property = True

and on Fomrs_KeyDown Event

If (e.KeyCode=Keys.Enter) then
   SendKeys "{TAB}"
End If

This works fine for all object on the form.
Is there any way to do like this in ASP.Net

Thanks,
Sohrab
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xml xsd validation free tool to download 10 106
PHP PDO get the error if exists 3 110
two submit buttons one form 15 114
AngularJS directive issue 6 86
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to count occurrences of each item in an array.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question