Datasource access question

I am new to VB.NET so this might be an easy one. But
any help is greatly appreciated.

I have a database table called photos that I want to pull
out two fields from (imagePath and filename) and
concatenate them with a base string to add up
to "/basedirectory/"+imagePath+filename.

I have built a datasource with the following lines under
sub page_load

objDataAdapter = New SqlDataAdapter(strSQL,objConnection)
objDataAdapter.Fill(objDataSet, "Photos")
fullList1.DataSource = objDataSet.Table("Photos").DefaultView
fullList1.dataBind()

where fullList1 is the identified object I use in the ASP
Server Controls

I want to build a string called imageURL if the filename
exists in the path shown. If not I want to imageURL to
just have "Filename does not exist"

The question is how best do I load this information as I
walk through the datasource to attempt to display all
files. How can I access the current element being used dy
fullList1 in an asp server control from a property routine
or other routine inside the main script loop?

I am including another excerpt from my code below to show
what I am trying to do. Any help is appreciated.

readonly property ImageURL as String
get
dim strURL as String
' I want to put logic here
Return strURL
end get
end property

inside of ASP code

runat="server" />


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories