Last post Nov 26, 2018 06:58 AM by Brando ZWZ
Nov 25, 2018 11:47 AM|Baiju EP|LINK
I have a text box in my asp.net+VB=SQL database web.
bidtxt.text is the textbox name.
I use barcode scanner to insert the id to serach the data in bidtxt.text
i wanted to remove the text inside the text box on another search. I used the below code.
<asp:TextBox ID="bidtxt" onChange="newobjCompute()" onFocus="this.value=''; return false;" runat="server" Width="300px" ToolTip="Box ID" AutoPostBack="True"></asp:TextBox>
It works only when i ckick on any other area in page and again click on text box it gets deleted.
But i am not using any other option in this page. I want to search with barcode scanner and on another clikc on search the text box should be empty.
any more idea on this
Nov 25, 2018 02:38 PM|oned_gk|LINK
Why not simply set tb.text = "" after search? You can display current id in a label or hiddenfield
Nov 25, 2018 05:02 PM|mazhar khan india|LINK
Nov 26, 2018 06:58 AM|Brando ZWZ|LINK
Hi Baiju EP,
According to your description, I suggest you could firstly search the barcode scanner library to find out the which method will fired when scan complete.
Then you could write the logic wiht textbox.text="" to remove the textbox and add value into it.