开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜