Dynamic Imageurls

AznCutie

Member
Joined
Nov 13, 2002
Messages
16
Location
West coast
I have a user control called menu.ascx, and it contains some links. When the user clicks on these links, whats supposed to happen is a pictures supposed to show up on the same aspx page... Basically, Im showing the images in a datalist with a dynamic ImageURL.

The thing is, Im not sure how to get a dynamic imageurl... Ive got this code for my menu.ascx, and I cant figure out how to expand on it so that I can get my images showing up.

Code:
<%@ Control Language="vb" %>
<script runat="server">
    
    Private sub Page_Load(ByVal obj As Object, ByVal e As EventArgs)
       Create an ArrayList of values to bind to 
      Dim arrValues As New ArrayList(5)
      
      arrValues.Add("Gifts & Acessories")
      arrValues.Add("Jewelry")
      arrValues.Add("Crystal")
      arrValues.Add("Clothing")
      arrValues.Add("Books, Music & Videos")
        
      Dim selectedID As String = Request.Params("selection")
      
      If Not selectedID Is Nothing Then
         MyDataList.SelectedIndex = CInt(selectedID)
      End If
    
      MyDataList.DataSource = arrValues
      
      bind all the control on the page
      MyDataList.DataBind()
      
    End sub   
</script>
<link rel="stylesheet" type="text/css" href="styles.css">
<table id="Table1" style="Z-INDEX: 101; WIDTH: 184px; POSITION: relative" cellspacing="1" cellpadding="1" width="184" border="0">
	<tr>
		<td>
			<asp:datalist id="MyDataList" runat="server" selecteditemstyle-backcolor="cyan" width="170" cellspacing="0" cellpadding="3">
				<itemtemplate>
					<asp:hyperlink id="Hyperlink1" class="MenuUnSelected" navigateurl=<%# "product.aspx?selection=" & container.ItemIndex %> runat="server">
						<%# Container.DataItem  %>
					</asp:hyperlink>
				</itemtemplate>
				<selecteditemtemplate>
					<asp:hyperlink id="Hyperlink2" class="MenuSelected" navigateurl=<%# "product.aspx?selection=" & container.ItemIndex %> runat="server">
						<%# Container.DataItem  %>
					</asp:hyperlink>
				</selecteditemtemplate>
			</asp:datalist>
		</td>
	</tr>
</table>
Any help is greatly appreciated!!
 
Back
Top