//判断qty是否为数字
string SuID = txtQuantity.Text.ToString();
Regex reg = new Regex("^[0-9]+$"); //判断是不是数据,要不是就表示没有选择,则从隐藏域里读出来
Match ma = reg.Match(SuID);
if (!ma.Success)
{
Response.Write("<script>alert('This Qty is not number!!!');</script>");
this.txtQuantity.Focus();
return;
}
判断是否为数字
最新推荐文章于 2024-09-21 11:47:19 发布