The database is already in production, and sits on azure. Azure also holds the image files, with a guid.jpg naming scheme. They are in a folder on azure, and the filename is in the db. Did the following code customization to the PublicOverridesSub SetImageID1()to get the images to show in the edit-image-table.aspx page:
Dim selectedValue AsString = Me.DataSource.ImageID.ToString()
Dim filter2 As CompoundFilter = New CompoundFilter(CompoundFilter.CompoundingOperators.And_Operator, Nothing)
Dim whereClause2 As WhereClause = New WhereClause()
filter2.AddFilter(New BaseClasses.Data.ColumnValueFilter(ImageTable.ImageID, selectedValue, BaseClasses.Data.BaseFilter.ComparisonOperator.EqualsTo, False))
Dim rc() As ImageRecord = ImageTable.GetRecords(whereClause2, New OrderBy(False, False), 0, 1)
Dim itemValue As ImageRecord = DirectCast(rc(0), ImageRecord)
Dim cvalue AsString = Nothing
Dim fvalue AsString = Nothing
cvalue = itemValue.ImageID.ToString()
fvalue = itemValue.Format(ImageTable.FileName)
Me.ImageID1.ImageUrl = "http://~core.windows.net/~photos/" & fvalue
Did I do this "the right way"? It does work.
Also, I want to do this with an image gallery page, but cannot find where the images are linked as they were in this code block. Any ideas?