adding a variable inside a hyperlink template (inside a datalist)

D

Dave

Hi ,

I have the following where I need to append a string variable inside a
hyperlink
template, inside a datalist. The variable 'categoryList' is the culprit.
No matter where this variable is declared, the compiler says it is
'undefined'.
What am I missing here? I am a newbie to ASP.NET trying to rebuild my ASP
library.


<asp:datalist id="list" Height="8px" Width="250px" runat="server">

<ItemTemplate>

&nbsp;

<asp:HyperLink id="HyperLink1" runat="server"
CssClass="CategoryUnselected" NavigateUrl='<%# "../index.aspx?catID=" &
categoryList & "|" & DataBinder.Eval(Container.DataItem, "CategoryID")%>'
Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName") %>'>

</asp:HyperLink><br />

</ItemTemplate>

</asp:datalist>



TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top