how to put white space before and after a character in text field
how to put white space before and after a character in text field
eg Text="John"
so i need whit space before a开发者_如何学编程nd after John
You could try this:
SomeField.Text = " " + SomeField.Text + " ";
or using string.Format:
SomeField.Text = string.Format(" {0} ", SomeField.Text);
string InputValue = " " + MyTextBox.Text + " ";
Using Jquery, you could call this method...
function changeTxtBox(controlID) {
var oldValue = $(controlID).val();
var newValue = ' ' + result + ' ';
$(controlID).val(newValue)
}
精彩评论