Hi.
I am using a radrotator for an image gallery. When i first bind the rotator it is fine.
But when i bind it again after postback, it gives me an error:
Unable to cast object of type 'Telerik.Web.UI.RadRotatorItem' to type 'Telerik.Web.UI.ControlItem'.
I don't understand why it is doing that.
Here is the code for the binding:
Private Sub RebindRotator()
Dim projID As Integer = CInt(Request.QueryString("ID"))
Dim query = From tbl In db.ProjectsImages Where tbl.ProjectID = projID Select tbl
If Not query Is Nothing Then
ThumbnailsRadRotator.DataSource = query
ThumbnailsRadRotator.DataBind()
End If
End Sub
Any help would be highly appreciated :-(
I am using a radrotator for an image gallery. When i first bind the rotator it is fine.
But when i bind it again after postback, it gives me an error:
Unable to cast object of type 'Telerik.Web.UI.RadRotatorItem' to type 'Telerik.Web.UI.ControlItem'.
I don't understand why it is doing that.
Here is the code for the binding:
Private Sub RebindRotator()
Dim projID As Integer = CInt(Request.QueryString("ID"))
Dim query = From tbl In db.ProjectsImages Where tbl.ProjectID = projID Select tbl
If Not query Is Nothing Then
ThumbnailsRadRotator.DataSource = query
ThumbnailsRadRotator.DataBind()
End If
End Sub
Any help would be highly appreciated :-(