how to delete details from textbox
hiiiiiii...i wanted to know how to delete the details displayed on textbox and even the database should be updated
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
ShankeyPosted Nov 22, 2010, 4:06 AM
I am not clear with your problem, but at first sight it looks that you want to delete the data from the database which is currently displayed in the textbox like details of employee. So based on the employee unique id you can delete it from the database by writing delete query on the delete button.
If this is not the case then plz elaborate your problem with some more details.
Hirendra SisodiyaPosted Nov 23, 2010, 12:55 AM
i think you are trying to delete record from database when text of textbox become blank... if i am right then you can use textbox.textchanged event, in this event you can check when textbox become blank, on that time you can use delete query.
thanks
Jiteendra SampathiraoPosted Nov 22, 2010, 11:06 PM
write a method and call the method when you want clear the textboxes.
Ex:
Clearall()
{
textbox1.text="";
textbox2.text="";
textbox3.text="";
textbox4.text="";
textbox5.text="";
}
this type of methods can be useful when we want to reset all the values.
If this post helped you, then tick the "Do you like this Answer" checkbox.