ValidationExpression="在这写正则表达式,(应该怎么写捏)"

解决方案 »

  1.   


    Regex r = new Regex(@"^[a-zA-Z0-9]+$");
                if (r.IsMatch(this.txtPrice.Text))
      

  2.   

    ^[a-zA-Z0-9]+$为什么楼上的各位都比我快呢!~
      

  3.   

    Regex r = new Regex(@"^[a-zA-Z0-9]+$");
    if (r.IsMatch(this.txtPrice.Text))
      

  4.   

     只能输入英文字母和数字,不能输入中文 
    CODE: 
    <input onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"> 
    http://hi.baidu.com/pctonc/blog/item/504957fbd8f35fd6b58f3168.html