I had a play and managed to work a way to get what I wanted. Thanks for point
in the right direction. In order to do it I had tackled it as follows;
1> Placed a literal control in the datalist itemtemplate.
2.> edited ItemDataBoundEvent as follows
Protected Sub dlstICEModels_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataListItemEventArgs) Handles
dlstICEModels.ItemDataBound
Dim tmpDataListItem As DataListItem
tmpDataListItem = CType(e.Item, DataListItem)
Dim tmpLiteral As Literal
tmpLiteral = CType(e.Item.FindControl("Literal1"), Literal)
tmpLiteral.Text = "<img src='UI/images/p.gif' onclick='javascript:"
& tmpDataListItem.ClientID & "_txtQTY.value = (" & tmpDataListItem.ClientID &
"_txtQTY.value * 1) + 1 ;' />"
End Sub
3.> Was suprised that I managed to get it working :). Key thing to watch
out for is also make sure that you use the correct CASE as javascript is not
as forgiving as VB.net.
Thanks
Neil
> I would play with the event OnItemDataBound and the ClientID of the current
> button:
[quoted text clipped - 22 lines]
> >
> > Neil
Teemu Keiski - 25 Oct 2007 17:17 GMT
I've also blogged about it in the past
http://aspadvice.com/blogs/joteke/archive/2005/06/23/2341.aspx
The example itself is a bit bad since you can just use this keyword in that
case, but getting ID with that idea is the point

Signature
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net
>I had a play and managed to work a way to get what I wanted. Thanks for
>point
[quoted text clipped - 61 lines]
>> >
>> > Neil