You can use the Trim function to remove spaces on both the left and the right side of a string.
syntax: Trim(string)
Example 1:
Output:
The LTrim function will remove spaces on the Left and the RTrim
function will remove spaces on the right.
Imagine you created an online form with a textfield called 'txtName' and
the visitor accidentally hit the space bar before filling in his name.
The Request.form("txtName") command would retrieve his name
with an accidental space before his name, so it can be good practice to
use the Trim function for this eventuality as the example below shows.
Get the best asp web hosting provider now and save 30%
Plug and play ASP membership script that integrates with PayPal to let you charge recurring membership fees.