@{
var arg1 = Request.QueryString["ti"];
var pass = "";
string cs = System.Configuration.ConfigurationManager.ConnectionStrings["DBconnectionString"].ConnectionString;
System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection(cs);
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand("select * from ticketlist where ticket ='"+arg1+"'", con);
con.Open();
System.Data.SqlClient.SqlDataReader reader = cmd.ExecuteReader();
if(reader.HasRows)
{
pass = "1";
}
else
{
pass = "0";
}
reader.Close();
con.Close();
}
@pass
文章標籤
全站熱搜
留言列表