文本框在起点处不包含空格 [英] A textbox doesnot contain a space at starting point

查看:64
本文介绍了文本框在起点处不包含空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,我希望文本框的代码在开始时不包含空格.请发送代码.

Hi friends i want a code for a textbox does not contain a space at starting point. Please send the code.

推荐答案

if (!myTextBox.Text.StartsWith(" "))
   {
   ...
   } 


客户端解决方案:

http://stackoverflow.com/Questions/2096720/in-javascript-or-jquery-how-to-to-detect-whitespace-in-beginning-of-string [
Client side solution:

http://stackoverflow.com/questions/2096720/in-javascript-or-jquery-how-to-detect-whitespace-in-beginning-of-string[^]


这篇关于文本框在起点处不包含空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆