I am attempting to manually sort products and have been unable to do so.
I've tried the following methods so far.
Code: Select all
<asp:Label ID="SortResultsLabel" runat="server" Text="Sort:" SkinID="FieldHeader"></asp:Label>
<asp:DropDownList ID="SortResults" runat="server" AutoPostBack="true" CssClass="sorting" OnSelectedIndexChanged="SortResults_SelectedIndexChanged">
<asp:ListItem Text="<Select Sort>" Value="" Selected="True"></asp:ListItem>
<asp:ListItem Text="By Name (A -> Z)" Value="Name ASC"></asp:ListItem>
<asp:ListItem Text="By Name (Z -> A)" Value="Name DESC"></asp:ListItem>
<asp:ListItem Text="Featured" Value="IsFeatured DESC, Name ASC"></asp:ListItem>
<asp:ListItem Text="By Price (Low to High)" Value="Price ASC"></asp:ListItem>
<asp:ListItem Text="By Price (High to Low)" Value="Price DESC"></asp:ListItem>
<asp:ListItem Text="By Manufacturer (A -> Z)" Value="Manufacturer ASC"></asp:ListItem>
<asp:ListItem Text="By Manufacturer (Z -> A)" Value="Manufacturer DESC"></asp:ListItem>
</asp:DropDownList>
Code: Select all
//SORT THE CATEGORIES ACCORDINGLY
// jme 050608 string sortExpression = SortResults.SelectedValue;
string sortExpression = String.Empty;
Any help would be appreciated
Lori