Solved

Enter Key on ASP.Net Forms

Posted on 2006-07-07
4
179 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

623 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