Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Hyperlinked Bulleted List with NavigateURL

$
0
0

I have a bulleted list bound to a datasource. The datasource returns and ID and a topic name. I have built the bulleted list and displayed it as a hyperlink but I need to display a details page and send the ID as a querystring. This is my code.

<asp:BulletedList ID="BulletedList1"
    runat="server"
    AppendDataBoundItems="true"
        DataSourceID="HealthTopicDS"
        DataTextField="TopicName"
        DataValueField="ID"
        DisplayMode="HyperLink"
        DataValueFormatString="health-topic-detail.aspx?ID={0}" ></asp:BulletedList><asp:AccessDataSource ID="HealthTopicDS" runat="server"
        DataFile="~/healthtopics.mdb"
        SelectCommand="SELECT [ID], [TopicName] FROM [topics] ORDER BY [TopicName]"></asp:AccessDataSource>

What I get for the URL is   http://localhost:49255/healthcenter3/11

I am expecting http://localhost:49255/healthcenter3/health-topic-detail.aspx?ID=11

What do I need to correct?

Jef


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>