3 Answers, 1 is accepted
0
0
Luis
Top achievements
Rank 1
answered on 28 Oct 2009, 10:58 AM
this is the VB code to fill the RadRotator
---------------------------------------------------------------------------
Dim image_Dir As String = "~/Userimages/User/"
Dim c As List(Of String) = New List(Of String)
Dim html As String
For Each s As String In Directory.GetFiles(Server.MapPath(image_Dir))
Dim extension As String = Path.GetExtension(Path.GetFileName(s))
If extension = ".jpg" Or extension = ".png" Or extension = ".bmp" Or extension = ".gif" Then
html = image_Dir & Path.GetFileName(s)
c.Add(html)
End If
Next
RadRotator1.DataSource = picarray
RadRotator1.DataBind()
--------------------------------------------------------------------------
and the source Code
--------------------------------------------------------------------------
<telerik:RadRotator ID="RadRotator1" runat="server" Width="490" ItemWidth="150" Height="150" ItemHeight="150"
RotatorType="ButtonsOver" PauseOnMouseOver="true" ScrollDirection="Right,Left">
<ItemTemplate>
<div>
<asp:Image ID="Image1" runat="server" ImageUrl='<%#Container.DataItem%>' Height="150px" Width="150px" />
</div>
</ItemTemplate>
</telerik:RadRotator>
-------------------------------------------------------------------------
Thanks
---------------------------------------------------------------------------
Dim image_Dir As String = "~/Userimages/User/"
Dim c As List(Of String) = New List(Of String)
Dim html As String
For Each s As String In Directory.GetFiles(Server.MapPath(image_Dir))
Dim extension As String = Path.GetExtension(Path.GetFileName(s))
If extension = ".jpg" Or extension = ".png" Or extension = ".bmp" Or extension = ".gif" Then
html = image_Dir & Path.GetFileName(s)
c.Add(html)
End If
Next
RadRotator1.DataSource = picarray
RadRotator1.DataBind()
--------------------------------------------------------------------------
and the source Code
--------------------------------------------------------------------------
<telerik:RadRotator ID="RadRotator1" runat="server" Width="490" ItemWidth="150" Height="150" ItemHeight="150"
RotatorType="ButtonsOver" PauseOnMouseOver="true" ScrollDirection="Right,Left">
<ItemTemplate>
<div>
<asp:Image ID="Image1" runat="server" ImageUrl='<%#Container.DataItem%>' Height="150px" Width="150px" />
</div>
</ItemTemplate>
</telerik:RadRotator>
-------------------------------------------------------------------------
Thanks
0
Hi Luis,
I used the provided information and prepared a test project, but I was not able to reproduce the problem on my side. Could you please rework the attached test project, open a new support ticket and send it back? I will check it and do my best to provide a working solution.
Kind regards,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I used the provided information and prepared a test project, but I was not able to reproduce the problem on my side. Could you please rework the attached test project, open a new support ticket and send it back? I will check it and do my best to provide a working solution.
Kind regards,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.