Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 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
 
Old March 19th, 2006, 08:55 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default onkeypress not supported in asp.net 2.0 ??

Hi,
I was using this code in asp.net 2003 and it was working fine..

<asp:textbox onkeypress="OnlyNumber('txtConfirmACnumber')" id="txtConfirmACnumber" oncopy="return false" runat="server" ></asp:textbox>


function OnlyNumber(str)
             {
                       if ( ((window.event.keyCode <48) | (window.event.keyCode >57)))
                        {
                             window.event.returnValue=false;
                        }
}

But this code does not work properly in asp.net 2.0
Can anyone tell me is onkeypress not supported in asp.net 2.0????
THANKS


Savan
__________________
Savan
 
Old March 19th, 2006, 04:46 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I think you may need to use OnTextChanged






Similar Threads
Thread Thread Starter Forum Replies Last Post
onkeypress move to next control [except when the f kamii47 ASP.NET 2.0 Professional 2 September 11th, 2007 03:47 AM
.NET Not Fully Supported on SQL Server 2005 jparkgb SQL Server 2005 0 October 12th, 2006 10:18 AM
Onkeypress Fia VB.NET 2002/2003 Basics 0 May 6th, 2005 05:19 AM
Error - "UNICODE ASP files are not supported" srt18 BOOK: Beginning ASP 3.0 2 February 12th, 2005 02:36 PM
How to hijack backspace onkeypress (or keydown)? scubaduba Javascript How-To 1 November 8th, 2004 05:41 AM





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