tried using this code below, but the problem is it is sending all the items in the datalist versus the one that is relevant to the item clicked. Can someone help
Public Function SetLink(ByVal thelink As String)As String
Session("link"=theLink
'nextgrid.databind
Return ""
End Function
<asp:datalist ID="nextgrid" runat="server" Font-Bold="true" RepeatColumns="1" RepeatDirection="Horizontal">
<headertemplate><font color="#990000">Folders</font></headertemplate>
<itemtemplate>
<table>
<tr>
<td><img src="../1/images/folder.gif" width="17" height="15"><asp:linkbutton ID="folderlink" runat="server" OnClick="getnewfiles" Text="<%# Container.DataItem.thefolder %>"></asp:linkbutton><%# SetLink(Container.DataItem.thefolderlink) %></td>
</tr>
</table>
</itemtemplate>
</asp:datalist>
Public Function SetLink(ByVal thelink As String)As String
Session("link"=theLink
'nextgrid.databind
Return ""
End Function
<asp:datalist ID="nextgrid" runat="server" Font-Bold="true" RepeatColumns="1" RepeatDirection="Horizontal">
<headertemplate><font color="#990000">Folders</font></headertemplate>
<itemtemplate>
<table>
<tr>
<td><img src="../1/images/folder.gif" width="17" height="15"><asp:linkbutton ID="folderlink" runat="server" OnClick="getnewfiles" Text="<%# Container.DataItem.thefolder %>"></asp:linkbutton><%# SetLink(Container.DataItem.thefolderlink) %></td>
</tr>
</table>
</itemtemplate>
</asp:datalist>