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

Home Posts Topics Members FAQ

Web Control dropping Keystrokes

4 New Member
Has anyone experienced this? I have a web control with a number of text boxes. When the user types into one of the text boxes, an occassional character will be dropped. It is not a specific character, or position; the characters are dropped at seemingly random moments. "AutoPostBa ck" is not set for any of these text boxes, and the control itself is not set for AutoPostBack either.

The code is written in Visual Studio 2003 C#.
Sep 15 '08 #1
5 1281
balabaster
797 Recognized Expert Contributor
Do you have any javascript functioning on the window or on the textbox itself. Specifically do you handle keypress, keydown or keyup and inside of those events, do you have something like evt.handled = false set anywhere? These are the only reasons I can think that a keypress would be dropped. The autopostback shouldn't have any effect as this is handled when you focus out of the textbox. Oh, that leads me to another thought, If you *did* have AutoPostBack enabled on this control and you have any other objects trying to grab focus, then when the other control grabs focus, this one would be prompted to postback if the contents had changed when it lost focus. I'll keep thinking, but I think they're the most obvious answers off the top of my head.
Sep 15 '08 #2
Glenn Rosenthal
4 New Member
I will double-check (I have just inherited this code and problem this morning).

But at this point, I do not see any client-side code/scripting/what-have-you. I am really wondering what to look for when it is a control inside a page.
Sep 15 '08 #3
balabaster
797 Recognized Expert Contributor
I will double-check (I have just inherited this code and problem this morning).

But at this point, I do not see any client-side code/scripting/what-have-you. I am really wondering what to look for when it is a control inside a page.
Normally I would say that if it's literally dropping keystrokes (and of course it's a web application) then it must either be client side code issues (i.e. Javascript) or it must be an issue with the browser or client machine. Is this behaviour consistent across multiple clients or is it a single particular client that's noticing this behaviour?
Sep 15 '08 #4
Glenn Rosenthal
4 New Member
It really doesn't look like anything pertaining to client side coding; I've put in some tracers, and nothing seems to be firing during the data entry. My own theory is its the page containing the control.
Sep 15 '08 #5
balabaster
797 Recognized Expert Contributor
It really doesn't look like anything pertaining to client side coding; I've put in some tracers, and nothing seems to be firing during the data entry. My own theory is its the page containing the control.
If there's no javascript firing on the object nor is there any javascript set at the ASCX level that handles keypress/keydown/keyup, then that leaves the ASPX and any master pages to which the ASPX belongs. Load full page up in IE and do view source. Do a search for keypress, keydown and keyup and see if anything springs up. Keystrokes are handled client side, not server side, so there must be a client script somewhere -

embedded in the ASCX HTML code OR
dynamically added in the code behind for the ASCX OR
embedded in the ASPX HTML code OR
dynamically added in the code behind for the ASPX OR
... you get the picture

...check the ASCX, ASPX and Master pages. Don't forget to check the code behinds for each too. Realise also that a script can be attached to an object at runtime in Javascript without it being in the onlick, onkeypress, onkeydown, onkeyup properties of the object itself - for instance:

Expand|Select|Wrap|Line Numbers
  1. document.onload = function(){
  2.   var elem = document.getElementById("MyElem")
  3.  
  4.   elem.onkeypress = function(event){
  5.     //Do my bidding...
  6.   }
  7. }
This may be added at a higher level than the ASCX, but could still be attached to the object embedded inside. So just because it's not in a user control, doesn't mean it's not there...
Sep 15 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4983
by: Olli Piepponen | last post by:
Hi, I'm having a little problem catching keystrokes under Windows. I did a little research and found that with mscvrt.getch() one can cath a single key that is pressed. However this doesn't work when the program is run on the backround and not as the primary task. What I would like to have is a same sort of function that would also work when the program is being run on the background. I'm trying to implement a program that would listen...
1
2993
by: Will Stuyvesant | last post by:
I never used the popen or popen2 libraries but it is my understanding that they can capture the output of console based programs. Is it also possible to send keystrokes to console base programs? I would like to program a Python program that can play for instance the tty version of nethack 3.4.3 on Windows, simulating a human player: for nethack it would not be possible to know if a human or a computer program is playing it. It is a...
11
3204
by: Brian W | last post by:
Yet another editor problem To reproduce do the following 1) Open a Webform and switch to HTML edit mode 2) Enter the Following (include spaces) This is some text before <asp:hyperlink id="hl1" runat="server " navigateurl="http://www.microsoft.com">This is my link</asp:hyperlink> And this is my text after the Hyperlink
5
1952
by: jqpdev | last post by:
Hello all... I'm coming from a Borland Delphi background. Delphi has a specific component called a Data Module. In the designer the Data Module behaves like a windows form. A developer can drop non-visual (controls) on the data module surface and wire them up and create procedures, functions, event procedures. In the source file (code behind file) the Data Module is a class, and the dropped components are public properties. The...
5
2808
by: Richard Brown | last post by:
Ok, I've been looking through the .NET SDK docs and stuff. I'm wondering if you can provide a control extender that does generic validation or functionality just by dropping it on the form. For instance, using the IExtenderProvider interface, you can specify properties, but there is nothing documented about linking into a control's events. For instance, in my application, there are specific formatting, functionality and validation for...
0
1241
by: Robert Jenkins | last post by:
I am trying to send a string of data to a remote Terminal Server session via the ActiveX client. I can start the session login or logout okay but I can't send data very well. I can send any data that is a "single key stroke" meaning that if I send the letter "A" or the letter "a", I always get "a". I don't understand how to send the shift keys or control keys. Is this the correct interface? I would like to use this interface because it...
1
1021
by: Mark | last post by:
Hello, I have a master page with a horizontal menu control which parts of disappear when dropping down across content controls. How do you get the menu control to show no matter what it's dropping down over? Thanks in advance! Any help would be greatly appreciated.
3
2887
by: =?Utf-8?B?QmVybmFyZG8gU2FsYXphciBuZXdi?= | last post by:
Hi everybody... i need help with this issue: i have a textbox control with the focus. at side, i have a datagridview control populated with some data. i need to control behavior of dgv control from textbox. when i press pagedown/pageup key (in textbox), i need to send that key to dgw, to move the data up/down, but, without loss the focus in textbox. i already studied the sendkeys.send, but i dont know how to send a key to control, the...
8
2079
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I created a user control that handles certain keystrokes, e.g. Ctrl-C for cut, Ctrl-V for paste, plus other more specialized keystrokes. I want to list these in the menubar like any other menu items. Once I assign a Shortcut Key to the menu item, that menu sees the event before the control, as one would expect. The question is, then, inside the menu item handler what code do I need to pass on the keystroke to a control? This is slightly...
0
8384
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...
0
8820
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
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
8601
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...
0
7314
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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
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.