Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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
  #1 (permalink)  
Old February 7th, 2007, 09:03 AM
Authorized User
 
Join Date: Aug 2006
Location: Mumbai, Maharastra, India.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default post back

hi friends

on aspx form i have one server button


i am writing some value to textbox

when ever i press enter key while entering value in textbox

server buttons code get execute

i have another html button
on aspx page

i want some thing like whenever i press enter key

it should fire html buttons client side code

how can i do this

thanks lot




  #2 (permalink)  
Old February 7th, 2007, 02:24 PM
Friend of Wrox
Points: 2,101, Level: 18
Points: 2,101, Level: 18 Points: 2,101, Level: 18 Points: 2,101, Level: 18
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: , , .
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

I ran into a problem where the post back would not happen when hitting the 'Enter' key unless there were two textboxes on the page. So, what I did was add a hidden textbox to the page. I'm not sure if this is exactly your problem.

Richard

  #3 (permalink)  
Old February 7th, 2007, 02:28 PM
Authorized User
 
Join Date: Feb 2007
Location: , , USA.
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Default

        You may want to write JavaScript OnKeyDown handler on <body> tag of your page and capture "window.event.keyCode == 13" and execute your HTML code.

Hope this may work for you..





Similar Threads
Thread Thread Starter Forum Replies Last Post
post back SKhna ASP.NET 2.0 Basics 1 March 10th, 2008 09:23 AM
Why does the form always post back? Conch General .NET 9 January 9th, 2007 04:12 PM
Weird post back behavior mjhoagland Classic ASP Professional 3 December 26th, 2006 10:31 AM
Post Back rngrmn Pro VB.NET 2002/2003 1 May 5th, 2006 11:21 AM
Post Back rngrmn VB.NET 2002/2003 Basics 2 April 6th, 2006 01:14 PM





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