protected void Page_Load(object sender, EventArgs e) { // this will remove any spaces after the contents of the text box have been submitted to the server. string nospaces = myTextBox.Text.Trim(); ... do something with the trimmed string ... }
TextBox1.Text.Trim()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)