Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6111451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:37:54+00:00 2026-05-23T14:37:54+00:00

I am using a JavaScript virtual keyboard for an ASP.NET TextBox. But using a

  • 0

I am using a JavaScript virtual keyboard for an ASP.NET TextBox. But using a TextBox gives an option to use even system keyboard. I am trying to use an ASP.NET label instead but its not working. Is there any way to make use of virtual keyboard strictly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:37:55+00:00Added an answer on May 23, 2026 at 2:37 pm

    Make your textbox read only.

    This way your user can not type in, but the javascript from the virtual keyboard can write. This is not a very good lokking user interface thow.

    Using Javascript

    Second trick is to use the the onkeypress and delete the key. You can add window.event.keyCode=0 on the TextBox when the key is pressed and reset every user input.

    onkeypress="window.event.keyCode=0;return false;"
    

    Like this

    <asp:TextBox runat="server" ID="txtTest2" 
      onkeypress="window.event.keyCode=0;return false;"></asp:TextBox>
    

    New Version

    This is works on every browser. I tested on chrome,firefox,ie

    <script>
    function DisableKeyboardOnMe(e)
    {   
        try
        {
            if (window && window.event)
                window.event.keyCode = 0;
            else
                e.which = 0;
        }
        catch(e){} 
    
        return false;
    }   
    </script>
    

    and

    <asp:TextBox runat="server" ID="txtTest3" 
        onkeypress="return DisableKeyboardOnMe(event);">test</asp:TextBox>
    

    One more simple way.

    I tested on all my browsers and this is working also.

     <asp:TextBox runat="server" ID="txtTest4" 
          onkeypress="return false;"></asp:TextBox>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a slightly augmented virtual keyboard from this tutorial: http://net.tutsplus.com/tutorials/javascript-ajax/creating-a-keyboard-with-css-and-jquery/ The Jquery: $(function(){
I am using Virtual Basic with ASP.NET in Visual Studio 2008. I am using
I want to implement my own clustering algorithm using this Virtual Earth javascript API:
I'm trying to execute my controller from javascript using jquery... here is my jquery
i'm using asp.net mvc3 with jquery datepicker widget. i want the user to click
I wrote a simple ASP.NET WebService Precompiled it and hosted it in a virtual
I have made a custom textbox that inherits from textbox. using System.Drawing; using System;
We employ Out-of-Process SQL Session State, ASP.NET 3.5 MVC 1.0 and Forms Authentication using
I am trying to implement Gmail style drag-and-drop file upload in ASP.NET MVC. I
Using Javascript how would I append an option to a HTML select menu? e.g

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.