Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.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 March 17th, 2005, 01:06 PM
Authorized User
 
Join Date: Mar 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default key press event in webforms

as we write question in google and want to seach any thing we dont need to click on search button just press return key(enter)and automaticaly seach button work perhaps by ascii value the event is fired but how to do it in a web application as its widows forms facility
 
Old March 17th, 2005, 02:41 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

You can do the same thing in javascript.Check for the enter key is pressed and raise the onClick event of button to submit the page.

 
Old March 18th, 2005, 11:28 AM
Authorized User
 
Join Date: Mar 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i hv tried but i dont know how to raise event for button click from text box

 
Old March 19th, 2005, 09:01 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anubhav.kumar
Default

hi,

simply write a method in javascript containing the line
************************************************** *****
 formname.submit(); //After proper validation of key and other things of course
//formname correspnds to the name of the form
************************************************** *****
and call it from the OnKeyPressed event of your control.

Anubhav Kumar
 
Old March 19th, 2005, 03:22 PM
Authorized User
 
Join Date: Mar 2005
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

WebForms don't support too many events.

You should use javascript.

Atul Kumar Sharma






Similar Threads
Thread Thread Starter Forum Replies Last Post
Simulating a key press with c++ Bourne C++ Programming 2 April 13th, 2007 02:03 PM
How to catch TAB key press with JScript? woojtii Javascript How-To 0 March 28th, 2007 05:53 AM
Key press problem diegoblin Beginning VB 6 3 October 5th, 2006 02:10 PM
TAB KEY working together KEY PRESS event thomaz C# 4 August 20th, 2006 02:47 PM
Force a Key Press? ashley_y VB How-To 2 January 9th, 2004 03:59 PM





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