If I have something like this in my code:
<asp:DataList id="DataList1" CellPadding="3" Font-Size="8pt" RepeatDirection="Horizontal" runat="server" DataSourceID="LabelMenuDataSource" ><ItemTemplate><a href="<%# DataBinder.Eval(Container.DataItem, "NavigateUrl") %>"><%# DataBinder.Eval(Container.DataItem, "DisplayText") %></a></ItemTemplate><SeparatorTemplate> | </SeparatorTemplate></asp:DataList>
I want to check to see if NavigateUrl contains a certain value, if it does then I want to act on it. I don't know much about Eval to be honest. I was hoping to do something like this
string url = DataBinder.Eval(Container.DataItem, "NavigateUrl")
and then use the url variable as normal but it doesn't like that. I suppose my question is how do I get just a single value from this LabelMenuDataSource so I can then manipulate it?
Thanks
DavidgCCC