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());
}
}
}
{
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());
}
}
}