Click here to Skip to main content
15,896,514 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am creating a numberic keypad in asp.net for touch screen for user to enter their code for login.. so when user clicks on 3 in my keypad, 3 appears in textbox..Now i could not get a method on how to put the code for backspace.. I had searched on textbox properties but could not get it., can anyone tell how is it done??
Posted

Strings have many properties. For example when they click on backspace you can use the left function to take everything but the last character. There are many ways this can be done.
 
Share this answer
 
you can try something like this in the javascript.
it will act like a backspace.
the below line will remove the last char of the textbox.
JavaScript
textbox.value =  textboxvalue.substring(0,textboxvalue.length-1);


note: pls handle exceptions :)
 
Share this answer
 
Comments
Codes DeCodes 11-Jan-14 1:35am    
thanks man.
Karthik_Mahalingam 11-Jan-14 3:03am    
Welcome jack :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900