The Namn , Message and sent i just want to write out and it works.
But with the seen i dont want to write true or false or 1 and 0. I want to change a image..
How does it work? I dont have a clue to where to begin.
Here is my code that works today.
Expand|Select|Wrap|Line Numbers
- <asp:SqlDataSource ID="SQL_LAS_MESS" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
- SelectCommand="SELECT TB_MESSAGE.MESSAGE, TB_MESSAGE.SENT, TB_USER.NAMN, TB_MESSAGE.SEEN,
- TB_MESSAGE.FROM_ID FROM TB_MESSAGE INNER JOIN TB_USER ON TB_MESSAGE.FROM_ID = TB_USER.USER_ID WHERE (TB_MESSAGE.TO_ID = @TO_ID) ORDER BY TB_MESSAGE.SENT DESC">
- <SelectParameters>
- <asp:QueryStringParameter Name="TO_ID" QueryStringField="USERID" />
- </SelectParameters>
- </asp:SqlDataSource>
- <asp:DataList ID="Guestbook_List" runat="server" DataSourceID="SQL_LAS_MESS">
- <ItemTemplate>
- <table border="1">
- <tr>
- <td>
- Från :
- <a href="USERPAGE.aspx?USERID=<%# Eval("FROM_ID") %>">
- <asp:Label ID="NAMNLabel" runat="server" Text='<%# Eval("NAMN") %>'></asp:Label></a>
- </td>
- <td>
- <asp:Label ID="SENTLabel" runat="server" Text='<%# Eval("SENT") %>'></asp:Label>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <asp:Label ID="MESSAGELabel" runat="server" Text='<%# Eval("MESSAGE") %>'></asp:Label>
- </td>
- </tr>
- </table>
- </ItemTemplate>
- <HeaderTemplate>
- Gästbok
- </HeaderTemplate>
- </asp:DataList>