I am working on web application and my problum is that when i enter a space insted of char or numeric value in the text box it will give me the database error so is there any way to avoid the space in the client side or can i trim the value of the text box befor i send it to database.