<% Dim PaintingID Set PaintingID = Request.QueryString("PaintingID") ' 230203 new (optional) param: checks if refered from an EXHIBITION context page => solves BREADCRUMB NAVIGATION error ' if so, then ex is set to the refering exhibitionID ' if ex blank or missing then (defaults) to non-exhibition (artist) referer page Dim exCheck Set exCheck = Request.QueryString("ex") Set Painting = oConn.Execute("SELECT * FROM Pictures WHERE Number=" & PaintingID) ArtistsID = Painting("ArtistNo") Set PaintingsArtist = Server.CreateObject("ADODB.RecordSet") sql = "SELECT ArtistFirstName,ArtistSurname FROM Artists WHERE ArtistID = " & ArtistsID PaintingsArtist.Open sql, oConn %>

  <% dim mh If IsObject(Session("mh")) Then Set mh = Session("mh") ' load in existing cart Else ' We use a dictionary so we can name our keys to correspond to our ' item numbers and then use their value to hold the quantity. An ' array would also work, but would be a little more complex and ' probably not as easy for readers to follow. Set mh = Server.CreateObject("Scripting.Dictionary") end if mh.Add CStr(Painting("Number")), CStr(Painting("Title")) Response.Write("mh size = " & mh.Count) ''' dim aTitles, aIDs, i 'aIDs = mh.Keys '''aTitles = mh.Items '''for i = 0 To mh.Count -1 ' Response.Write("ID = " & aIDs(i)) ''' Response.Write("Title = " & aTitles(i)) ''' Response.Write("----------------------------") '''next set Session("mh") = mh oConn.Close %>