In my Default.aspx page I have 2 datalist, first one is populated with categories and second one is populated with colors, ( as item template for both of them im using hyperlink) and I have listview that shows products.
So i want to sort data using those two datalists.... when I select one of categories the listview is populated with that category in the same page for e.g : - Default.aspx?CategoryID=1
( which i have done that)... but when I want this category products to be also sorted by
colors now here is the problem ...!!! I dont know how to achieve that :\
I know that after selecting second datalist whith color, url should be something like this:
Default.aspx?CategoryID=1&Color=red
or
Default.aspx?CategoryID=1&ColorID=1
any idea ?!
HERE IS Code
<div class="Div1" style="width: 150px; float: left;">
<p>
<asp:DataList ID="CateoriesDataList" runat="server">
<HeaderTemplate>
Categories
</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="CategoryHyperLink" runat="server" Text='<%#Eval("CategoryName").ToString() %>'
NavigateUrl='<%#String.Format("Categories.aspx?Category=" + (Eval("CategoryID").ToString() + "&" +Request.QueryString.ToString())) %>'></asp:HyperLink>
</ItemTemplate>
</asp:DataList>
</p>
<p>
<asp:DataList ID="ColorsDataList" runat="server">
<HeaderTemplate>
Colors
</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="ColorLink" runat="server" Text='<%# Eval("Color").ToString() %>'
NavigateUrl='<%#String.Format("Categories.aspx?Category=" + (Eval("CategoryID").ToString() + "&" +Request.QueryString.ToString())) %>'></asp:HyperLink>
</ItemTemplate>
</asp:DataList>
</p>
</div>
<div class="Div2" style="float: left; width: 300px;">
<asp:DataList ID="ProductsDataList" runat="server">
<HeaderTemplate>
Products
</HeaderTemplate>
<ItemTemplate>
<asp:Image ID="Image1" runat="server" Height="53px" Width="65px" />
<asp:HyperLink ID="HyperLink3" runat="server">HyperLink</asp:HyperLink>
<br />
</ItemTemplate>
</asp:DataList>
</div>
So its something like when you baying shoes from Footlocker.com ... and then you doing some kind of sorting lake: Basketball shoes, price, brand, size... etc
so thats my issue
I like to select category then i like to sort selected data by color or price...and my Default.asx?CategoryID=1&colorID=1 not to show duplicated parameters when again I want to filter by categories exp: Default.asx?CategoryID=3&CategoryID=1&colorID=1
if someone have any idea or can lead me to another source which referes to this kind of issues, I will be very thankful...
I Appreciete your time truely