سلام , دوستان من نمی دونم چرا این کد خطا داره !!! من دارم تو یک دکمه رجیستر سایت در asp.net مینویسم.
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=DANI;Initial Catalog=pic_gallery;Integrated Security=True");
SqlDataAdapter da = new SqlDataAdapter("select * from user_TBL where User_name=" + TextBox1.Text ,con);
DataTable dt = new DataTable();
da.Fill(dt);
if(dt.Columns.Count > 0)
{
Label1.Text = "wellcome!";
}
else
{
return;
}
}