Good Afternoon
I am using the following code to create a bulleted list based on records retrieved from a database. My bulleted list is set to DisplayMode="Hyperlink".
The DataTextField="downloadTitle" and the DataValueField="downloadFilename".
However, I would like to prefix the DataValueField with a string like this "download/".
How can I prefix the DataValueField with a bit of text?
Many thanks
Daniel
I am using the following code to create a bulleted list based on records retrieved from a database. My bulleted list is set to DisplayMode="Hyperlink".
The DataTextField="downloadTitle" and the DataValueField="downloadFilename".
However, I would like to prefix the DataValueField with a string like this "download/".
Code:
<asp:BulletedList ID="releteddownloads" runat="server" DataSourceID="ds_relateddownloads"
DataTextField="downloadTitle" DataValueField="downloadFilename" DisplayMode="HyperLink">
</asp:BulletedList>
<asp:SqlDataSource ID="ds_relateddownloads" runat="server" ConnectionString="<%$ ConnectionStrings:StPaulsDatabase %>"
SelectCommand="SELECT [downloadTitle], [downloadFilename] FROM [Downloads] WHERE ([downloadCategory] = @downloadCategory)">
<SelectParameters>
<asp:Parameter DefaultValue="Laptop Scheme" Name="downloadCategory" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
How can I prefix the DataValueField with a bit of text?
Many thanks
Daniel