S
Stimp
I have a datalist that outputs a link to a picture in each ItemTemplate:
e.g.
<aspataList id="DataList1" ...etc>
<ItemTemplate>
<a href='Pic.aspx?pic=somenumber'>picture</a>
</ItemTemplate>
<aspataList>
What I want to do is set the "pic=somenumber" querystring value
to the current DataList item's index.
e.g. something like:
Pic.aspx?pic=<%=DataList1.Items.Item.ItemIndex%>
This returns an error.
How can I retrieve the index of the current Item as it's loading the
template?
I could also create my own index value, that increments as the
DataList adds another ItemTemplate.. but not sure how to do this.
Thanks!
Peter
e.g.
<aspataList id="DataList1" ...etc>
<ItemTemplate>
<a href='Pic.aspx?pic=somenumber'>picture</a>
</ItemTemplate>
<aspataList>
What I want to do is set the "pic=somenumber" querystring value
to the current DataList item's index.
e.g. something like:
Pic.aspx?pic=<%=DataList1.Items.Item.ItemIndex%>
This returns an error.
How can I retrieve the index of the current Item as it's loading the
template?
I could also create my own index value, that increments as the
DataList adds another ItemTemplate.. but not sure how to do this.
Thanks!
Peter