Another "Database" Question

Jan 17, 2009 at 3:17 AM
I see there have been a couple of posts on the Database portion, but they are not exactly the same as what I am looking for.  It seems as though people want to actually store the images in the database, and this is not what I am after.  I want to stores the files in a directory and then store the file path in the database as well as the description, title, etc.  Is there a nice clean solution on how to do this?  I don't need an image handler or anything like that...

Thanks in advance.
Jan 17, 2009 at 9:40 PM
Well I am making progress, but can't seem to figure out why the Slide.Show app won't work when using the QueryString in my ashx.

<%@ WebHandler Language="VB" Class="SlideShow" %>
Imports System
Imports System.Web
Imports System.Xml
Public Class SlideShow : Implements IHttpHandler
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim AlbumID As Integer = CInt(context.Request.QueryString("PID"))
context.Response.Buffer = False
Using writer As New XmlTextWriter(context.Response.Output)
Dim SlideShowDC As New SlideShowDataContext
Dim r = SlideShowDC.GetSlideShowImages(AlbumID).ToList
writer.Formatting = Formatting.Indented
writer.WriteAttributeString("transition", "CrossFadeTransition")
For Each record As Object In r
writer.WriteAttributeString("title", record.Title)
writer.WriteAttributeString("source", record.Path)
End Using
End Sub
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Return False
End Get
End Property
End Class

Then I am using this in my Default.aspx
<object type="application/x-silverlight-2" data="data:application/x-silverlight-2," width="100%" height="100%">
<param name="background" value="black" />
<param name="source" value="Vertigo.SlideShow.xap" />
<param name="initParams" value="ConfigurationProvider=LightTheme,DataProvider=XmlDataProvider;Path=slideshow.ashx?PID=1"/>
<a href="" style="text-decoration: none;"><img src="" alt="Get Microsoft Silverlight" style="border-style: none" /></a>

Am I Close?  Is there a reason why my ashx won't work when using the querystring?
Jan 17, 2009 at 11:06 PM
It's all good, I posted my results and SOLUTION on my blog