I have everything almost 100% perfect now with the gallery. The one thing I have to accomplish is Image order. I store records in an SQL database and I create the XML file myself and populate it with data from the SQL databas (see below). There is a field in my database called ULIsPrimary. If this is Yes, I want that image to appear first. How can I accomplish this? Could I somehow populate the categoryid or properties of the XML file with Yes if ULIsPrimary is set to yes, and have the gallery sort by the categoryid or properties fields of the XML file? I just need someway to control which image appears first, short of say renaming the image with a bunch of aaaa's in front of the filename.
Dim w As System.IO.TextWriter = New System.IO.StreamWriter(directoryString + qFN1 + ".config")
Dim sb As New StringBuilder()
sb.Append("<photo name=""")
sb.Append("" & qFN1.Replace("&", "&").Replace("'", "'") & "")
sb.Append(""" categoryid="""" width=""")
sb.Append("" & Image1.Width & "")
sb.Append(""" height=""")
sb.Append("" & Image1.Height & "")
sb.Append(""" filesize=""")
sb.Append("" & qFS & "")
sb.Append(""" ipaddress="""" datetime="""" comment=""")
sb.Append("" & maxImageID & "")
sb.Append(""" title=""")
sb.Append("" & qNM.Replace("&", "&").Replace("'", "'") & "")
sb.Append(""" properties="""" />")
w.Write(sb.ToString())
w.Flush()
w.Close()
Image1.Dispose()