asp.net实现手机号码归属地查询
protected void Button1_Click(object sender, EventArgs e)
{
if (Regex.IsMatch(TextBox1.Text.Trim(), @"^\d{7,11}$"))
{
string num = TextBox1.Text.Trim().Substring(0, 7);
DataRow dr = DAL.oledb.ExecuteDataRow("db.mdb", "select * from list where num = ?", num);
if (dr != null)
{
Response.Write(TextBox1.Text.Trim() + "<br />" + dr["city"].ToString() + "<br />" + dr["cardtype"].ToString());
}
}
}
作者:-xu
邮箱:860072925@qq.com
QQ群:IOS/Android 25961346