code kiễm tra số đã test cho ae
Trang 1 trong tổng số 1 trang
code kiễm tra số đã test cho ae
code kiễm tra số đã test cho ae
(tùng)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
public partial class Default3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private static bool IsNumber(string val)
{
if (val != "")
return Regex.IsMatch(val, @"^[0-9]\d*\.?[0]*$");
else return true;
}
protected void Button1_Click(object sender, EventArgs e)
{
if (IsNumber(TextBox1.Text) != true)
{
Label1.Text=" Nhap sai";
}
else
Label1.Text=" Nhap dung";
}
}
(tùng)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
public partial class Default3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private static bool IsNumber(string val)
{
if (val != "")
return Regex.IsMatch(val, @"^[0-9]\d*\.?[0]*$");
else return true;
}
protected void Button1_Click(object sender, EventArgs e)
{
if (IsNumber(TextBox1.Text) != true)
{
Label1.Text=" Nhap sai";
}
else
Label1.Text=" Nhap dung";
}
}
lishishen201086- Tổng số bài gửi : 27
Points : 74
Join date : 15/11/2011
Trang 1 trong tổng số 1 trang
Permissions in this forum:
Bạn không có quyền trả lời bài viết
Fri Dec 11, 2015 8:42 am by Admin
» Bảng Điểm Tốt Nghiệp
Wed Apr 08, 2015 9:59 am by Admin
» Bạn có tự tin với “nói hay cùng talk”?
Mon Apr 06, 2015 9:03 pm by nhuocnhiaho
» Tổng hợp các tài liệu của ADMIN
Thu Feb 05, 2015 10:54 am by Admin
» Tài liệu môn cơ sở dữ liệu của Nguyễn Duy Phương
Thu Feb 05, 2015 10:44 am by Admin
» ORALCLE tài liệu thi
Sun Feb 01, 2015 6:00 pm by Admin
» CÁC CÂU ĐỊNH NGHĨA CỦA MÔN CHÍNH TRỊ
Sun Feb 01, 2015 5:56 pm by Admin
» Video hướng dẫn làm bài tập môn web đầy đủ
Fri Jan 30, 2015 1:09 pm by Admin
» Bai tập ôn thi môn lập trình web mới nhất
Fri Jan 30, 2015 1:07 pm by Admin