S
Shelly
I have two problems with what I am working on and would appreciate
suggestions.
Problem 1: The images are not displaying. I see that small box placeholder.
Problem 2: The hyperlink is doing nothing.
Here is the section of code for the display:
<ItemTemplate>
<asp:Image Id="Image1" runat="server" ImageUrl='<?#
Container.DataItem("TheFile") %>' />
<br>
<asp:Hyperlink ID="Hyperlink1" runat="server" Target="_blank"
NavigateUrl='<%# Container.DataItem("TheFile") %>'>
<%# Container.DataItem("TheName") %></asp:Hyperlink>
</ItemTemplate>
In the vb code-behind, the relevent code is:
dt = New DataTable
dt.Columns.Add(New DataColumn("TheFile", GetType(String)))
dt.Columns.Add(New DataColumn("TheName", GetType(String)))
For Each File in files
Dim name as String = getfiletitle(File)
dr = dt.NewRow()
dr(0) = File
dr(1) = name
dt.Rows.Add(dr)
Next
CreateDataSource = New DataView(dt)
Now when I look in the debugger, the value for File is correct and is
something like C:\the_full_path\the_file.jpg and the value for name is also
correct as the_file.jpg. The value that appears on the screen for the
hyperlink is correct and is the value of name. Putting the mouse over the
hyperling yields something like file:///c:/the_full_path/the_file.jpg, but
clicking it does nothing. Getting the properties of the block placeholder
for the picture just gives a "general" tab and the value is just the name of
the file. It doesn't display.
Any help would be appreciated.
suggestions.
Problem 1: The images are not displaying. I see that small box placeholder.
Problem 2: The hyperlink is doing nothing.
Here is the section of code for the display:
<ItemTemplate>
<asp:Image Id="Image1" runat="server" ImageUrl='<?#
Container.DataItem("TheFile") %>' />
<br>
<asp:Hyperlink ID="Hyperlink1" runat="server" Target="_blank"
NavigateUrl='<%# Container.DataItem("TheFile") %>'>
<%# Container.DataItem("TheName") %></asp:Hyperlink>
</ItemTemplate>
In the vb code-behind, the relevent code is:
dt = New DataTable
dt.Columns.Add(New DataColumn("TheFile", GetType(String)))
dt.Columns.Add(New DataColumn("TheName", GetType(String)))
For Each File in files
Dim name as String = getfiletitle(File)
dr = dt.NewRow()
dr(0) = File
dr(1) = name
dt.Rows.Add(dr)
Next
CreateDataSource = New DataView(dt)
Now when I look in the debugger, the value for File is correct and is
something like C:\the_full_path\the_file.jpg and the value for name is also
correct as the_file.jpg. The value that appears on the screen for the
hyperlink is correct and is the value of name. Putting the mouse over the
hyperling yields something like file:///c:/the_full_path/the_file.jpg, but
clicking it does nothing. Getting the properties of the block placeholder
for the picture just gives a "general" tab and the value is just the name of
the file. It doesn't display.
Any help would be appreciated.