<% s_CatID = request.querystring("CatID") ' response.write "

Category ID is " & s_CatID & "

" select case s_CatID case "A" strCatName = "All Items" strCatPDprev = "A" case "C" strCatName = "Clothing" case "N" strCatName = "Note cards" case "X" strCatName = "Christmas Items" case "M" strCatName = "Miscellaneous items" end select %>

<%=strCatname%>

Click on the item name to see details on the item and the page for ordering. Items which do not have options (such as colours or sizes) have a "Add to Cart" button in their box as well as another on their detail page.

<% Set objCmd = Server.CreateObject("ADODB.Command") objCmd.CommandType = adCmdStoredProc objCmd.CommandText = "usp_InventoryByCategory" objcmd.Parameters.append objcmd.createparameter("@CatName",advarchar,adParamInput,2,s_CatID) objCmd.ActiveConnection = stConn set rs = objCmd.Execute Set objCmd = Nothing if err <> 0 or (rs.EOF and rs.BOF) then response.write "

No items for display at the moment.

" else while not rs.EOF intItemID = rs("itemID") strItemName = rs("itemname") strImage = trim(rs("itemimage")) strURL = "" strCatID = rs("itemcategory") if s_CatID = "A" and strCatID <> strCatIDprev then select case strCatID case "C" strCatName = "Clothing" case "N" strCatName = "Note cards" case "X" strCatName = "Christmas Items" case "M" strCatName = "Miscellaneous items" end select response.write "

" & strCatName & "    Top of Page

" strCatIDprev = strCatID end if numPrice = rs("price") response.write "
" if rs("itembuynow") = 1 then %>

<% end if response.write "
" rs.movenext wend end if stConn.close set stConn = nothing %>