Help to convert VB.net code

Discussion in 'ASP .Net' started by id10t error, Feb 11, 2008.

  1. id10t error

    id10t error Guest

    I am making an ASP.net page where a user has a hand-held scanner
    running Internet Explorer. It has a finger scanner attached. When the
    user scans an item i want it to automatically input the data without
    the user pressing enter. I did this for another project in vb.net with
    the following coded
    If Asc(e.KeyChar) = Keys.Enter Then

    I tried to copy this into the asp.net program and get this error.
    'KeyChar' is not member of'System.eventArgs'

    How can i get this to work?
    id10t error, Feb 11, 2008
    #1
    1. Advertising

  2. id10t error

    Manish Guest

    I think you can trap the Enter key in the JavaScript code client side using
    this code

    if (event.keyCode == 13) {
    //alert(message);
    return false;
    }

    Regards,
    Manish

    www.ComponentOne.com

    "id10t error" wrote:

    > I am making an ASP.net page where a user has a hand-held scanner
    > running Internet Explorer. It has a finger scanner attached. When the
    > user scans an item i want it to automatically input the data without
    > the user pressing enter. I did this for another project in vb.net with
    > the following coded
    > If Asc(e.KeyChar) = Keys.Enter Then
    >
    > I tried to copy this into the asp.net program and get this error.
    > 'KeyChar' is not member of'System.eventArgs'
    >
    > How can i get this to work?
    >
    Manish, Feb 12, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?YmVib3Ax?=

    Convert VB code to C# code

    =?Utf-8?B?YmVib3Ax?=, Feb 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    922
    Kevin Spencer
    Feb 20, 2004
  2. Luqman
    Replies:
    3
    Views:
    4,174
    Jon Paal
    Mar 28, 2006
  3. Gary
    Replies:
    10
    Views:
    701
    Juan T. Llibre
    Feb 6, 2007
  4. Kenneth Osenbroch

    Convert VB code to C code.

    Kenneth Osenbroch, Nov 2, 2004, in forum: C Programming
    Replies:
    23
    Views:
    777
    Frank Adam
    Nov 9, 2004
  5. Wind
    Replies:
    0
    Views:
    441
Loading...

Share This Page