HI every one
I have 2 page
1-index.aspx and 2-store.aspx and House_info Table
House_info table
Id
|
Name
|
Image
|
Behcode
|
1
|
Jack
|
1.jpg
|
1111
|
2
|
Sara
|
2.jpg
|
2222
|
3
|
Andy
|
3.jpg
|
3333
|
In index.aspx I have 1 TB and 1 Button I want when user type behcode
in TB and click on BUTTON it go to store.aspx page and fill this page with data from
table House_info according to the behcode in this table
I know i should use querystring but here i have TB and i dont know how i can use it
this is my store.aspx code
SqlConnection _cn = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["behtopConnectionString"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
SqlCommand _cmd = new SqlCommand("select * from House_Info _cn);
_cn.Open();
SqlDataReader _dr = _cmd.ExecuteReader();
while (_dr.Read())
{
Label1.Text = _dr["Name"].ToString();
Image1.ImageUrl = "~/image/behcode/" + _dr["Image_Behcode"].ToString();
}
_cn.Close();
}
thanks