Saturday, March 10, 2012

Use value from DynamicContextKey in Code.?

Hi,

Basically, the Label can't be accessed via its ID directly when it's inside a Repeater. You may find it like this:

Protected Sub rateRating_Changed(ByVal senderAs Object,ByVal eAs AjaxControlToolkit.RatingEventArgs)Handles rateRating.Changed
 Dim rating As AjaxControlToolkit.Rating
rating = CType(sender, AjaxControlToolkit.Rating)
Dim label As Label
label = CType(rating.FindControl("label"), Label)

Dim ItemID asInteger =CInt(label.Text)

'Set Rating script
End Sub

 
Hope this helps. 

No comments:

Post a Comment