How to code href into DataList control
I am coding a DataList control for 2 column data from a stored procedure. The 1st column is programName and the 2nd is programLink. I used Edit Template -> Edit DataBonding to add
<h ref="http.....> to the 2nd column data, programlink, but can not get it right.
Please help. Also, what is the Parameter Source for using Logon User ID as a stored procedure paramter when configuring a SqlDataSource? None, cookie, control,..? Below is the coding I have been testing.
TIA,
Jeffrey
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" Style="z-index: 16;left: 29px; position: absolute; top: 82px">
<ItemTemplate>
programName:
<asp:Label ID="programNameLabel" runat="server" Text='<%# Eval("programName") %>'></asp:Label><br />
programlink:
<asp:Label ID="programlinkLabel" runat="server" Text='<%# Eval("programlink") %>'></asp:Label><br />
<br />
</ItemTemplate>
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:iTemplatesConnectionString %>"SelectCommand="MyPrograms" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="meid" Type="Int32" DefaultValue="3532" />
</SelectParameters>
</asp:SqlDataSource>
__________________
C. Jeffrey Wang
|