473,657 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onkeydown breaks with 2.0

I have a .NET 1.1 application which uses several grids of text boxs (in
repeaters and datagrids) for entering arrays of time values. I use onkeydown
to allow users to navigate through the grids using arrow keys. I'm attempting
to upgrade to .NET 2.0, but that particular functionality appears to be
broken now.

The actual javascript function is quite long and really irrelevant since the
problem appears to be with the onkeydown event firing off properly. Here is a
sample ASP textbox definition from within the item template of a repeater
control:

<asp:TextBox ID="txtLineHour s" onkeydown="Week KeyDownHandler( this)"
Height="12" AutoPostBack="F alse"
onFocus="this.s elect();"
CssClass="textb oxCrosshair" runat="server" Text='<%#
FormatHours(Dat aBinder.Eval(Co ntainer.DataIte m, "Hours")) %>'
Width="30" Style="text-align: center" />

I tried moving the onkeydown portion to the code behind, as in...

hrBox.Attribute s.Add("onKeyDow n", "return WeekKeyDownHand ler(this);")

I added that line to the foreach line item portion of the databinding code.
However, that doesn't work either, though I imagine the problem is with
"this". I'm not sure how to specify a textbox by unique name at this point
within the repeater array. Can anyone help me?

--
Thanks,

CGW
Jan 31 '07 #1
0 1138

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3903
by: Z | last post by:
I have sub-classed the TextBox. In its OnKeyDown event I can intercept key strokes, examine them, etc. When I get a certain keycode (e.g., 'A') I want to change it to another unicode key from a different code page (e.g., "\u2801"). But the KeyCode, KeyData, and KeyValue properties of KeyEventArgs are all only getters. They are read only and thus do not permit changing the assigned KeyCode. My question is this: How do I change the KeyCode...
4
9999
by: KublaiKhan | last post by:
I am trying to figure out what values are returned when keys are pressed in Mozilla & IE. Here's the code I'm using. There are no alerts in either browser. Any clues would be greatly appreciated. Thanks. KK <html> <head><title>Reading Keystrokes</title> <script language="JavaScript"> window.onkeyDown = keyHit;
3
7391
by: euler | last post by:
why did the keydown event not fire in this simple example? <HTML> <HEAD><title>keydown_div</title> <script type="text/javascript"> function keydown() { alert("keydown"); } </script>
10
9152
by: b.dam | last post by:
I'm trying the following: function grid() { this._el = document.createElement("TABLE"); var self = this; document.addEventListener("onkeydown", function(event) {self.gridKeyDown(event);}, false); }
2
5941
by: Iver Erling Årva | last post by:
I have come across a problem with the onKeyDown event in some of my forms. I'm using onKeyDown in <form> as a standard method to open my help screen system throughout my system, but I have discovered that If I have a <div></div> section somewhere and then load the contents of it from another file using innerHTML after the main window is loaded, the onKeyDown event doesn't trigger any more. I'm using IE6 and the structure is: <body...
4
4988
by: Udi | last post by:
Hi All, MyRichEdit is derived from RichTextBox. I'm overriding OnKeyDown. I'm trying to handle the TAB key but without printing it in the edit box: protected override bool IsInputKey(Keys keyData) { switch (keyData) {
0
1184
by: CGW | last post by:
I posted this in a .NET general newsgroup, but then found this group and I think it would be more appropriately posted here. Even though the problem is partially with client side behavior, I'm attempting to deal with it in my VB code behind. Here's my post... I have a .NET 1.1 application which uses several grids of text boxs (in repeaters and datagrids) for entering arrays of time values. I use onkeydown to allow users to navigate...
1
5744
eboyjr14
by: eboyjr14 | last post by:
I have this UserScript for Grease monkey. but I can't get the onleydown event to fire in FIREFOX only. I've looked everywhere! // ==UserScript== // @name iGoogle Suggest // @namespace Devin Samarin // @description This automatcally selects the top result for your query. // @include *google.com/ig* // ==/UserScript== function makeRequest() {
8
4261
by: Tony Johansson | last post by:
Hello! I wonder can somebody explain when is it suitable to use these methods OnKeyUp, OnKeyDown and OnKeyPress because these raise an event. These are located in class UserControl. If these raise an event how do I create an handler to catch these raised events. //Tony
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8502
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1941
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.