Hi
I have jquery menu in index.aspx page when user click on item related to that item it go to House.aspx and show products information in datalist these are my table in DB:
1-House_info Table
Id
|
Behcode
|
Name
|
Region
|
H_name
|
1
|
1111
|
Jack
|
1
|
Cloth
|
2
|
2222
|
Ana
|
1
|
Electric
|
3
|
3333
|
Edvard
|
2
|
electric
|
4
|
4444
|
Math
|
1
|
Furniture
|
2-House_product Table
Id
|
Behcode
|
Name
|
Description
|
H_name
|
1
|
2222
|
Iron
|
Test
|
Electric
|
2
|
4444
|
Sofa
|
Test
|
furniture
|
3
|
1111
|
Scarf
|
Test
|
Cloth
|
4
|
3333
|
Laundry
|
Test
|
electric
|
And these are my code in index.aspx and House.aspx
Index.aspx:
<ul>
<li>
<a href="house .aspx?H_name=Electric">Electric</a>
<ul>
<li class="current"> <a href="house .aspx?H_name=Furniture>Sofa</a></li>
2-House_aspx
string Code = Request.QueryString["H_name"];
SqlCommand _cmd = new SqlCommand("select * from House_p where H_name=@H_name", _cn);
_cmd.Parameters.AddWithValue("@H_name", Code);
_cn.Open();
SqlDataReader _dr = _cmd.ExecuteReader();
if (_dr.HasRows)
{
DataList1.DataSource = _dr;
DataList1.DataBind();
}
_cn.Close();
EX:
In index.aspx When user click on Electric item it go to house.aspx and show all product that have H_name=Electric According to House_p table it will show :
Id
|
Behcode
|
Name
|
Description
|
H_name
|
1
|
2222
|
Iron
|
Test
|
Electric
|
4
|
3333
|
Laundry
|
Test
|
electric
|
Now I have one DDL and 1 button in House.aspx page I want when user click on menu and go to house.aspx page after they see result of their selected item from menu choose their region from ddl and click on button after that they see product that are in that region according to table House_info
EX:
If user select region 1 it will show all Electric product that have region=1
Id
|
Behcode
|
Name
|
Description
|
H_name
|
1
|
2222
|
Iron
|
Test
|
Electric
|
thanks