Condition in ASP Repeater
- by Abdel Olakara
Hi all,
I am trying to put a condition into my ASP repeater tag. I have a table being created and one of the td items is a link. The problem is I need to create a link upon checking the value in one the variable that is in the repeater container. Here is my code:
<td><%#((VWApp.Code.TrackDM)Container.DataItem).CdNo%></td>
<td><%#((VWApp.Code.TrackDM)Container.DataItem).ShippingNo%></td>
Now i need to check the value of ShippingNo and rather than displaying it need to display a link. i tried to write an if condition like this:
if(((VWApp.Code.TrackDM)Container.DataItem).ShippingNo. .. )
{
// do processing and generate a link that needs to displayed
}
But i get error when trying to do this. Can anybody guide me to the right way of doing this?
Any ideas and suggests are highly appreciated.