开发者

how to put white space before and after a character in text field

开发者 https://www.devze.com 2023-02-26 16:34 出处:网络
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 JohnYou could try this:

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)
}
0

精彩评论

暂无评论...
验证码 换一张
取 消