Problem with ImageURL

5 posts, 1 answers
  1. Ronan BARRANGER
    Ronan BARRANGER avatar
    24 posts
    Member since:
    Mar 2010

    Posted 10 Mar 2012 Link to this post

    I have a problem to display images in a RadRotator.

    The image is saved in database.

    When i display images in a repeater it works perfectly but when i do the same thing within a radRotator, the image is not displaying

    <asp:Repeater runat="server" ID="Repeater1" DataSourceID="SqlDataSource1">
        <ItemTemplate>
            <fieldset style="float: left; width: 350px; height: 150px;">
                <legend><b>Company Name</b>:
                    <%#Eval("ImageID")%></legend>
                <div class="details">
                    <div class="photo-container">
                        <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("Image") %>'
                            AutoAdjustImageControlSize="false" Width="90px" Height="110px" />
                    </div>
                </div>
            </fieldset>
        </ItemTemplate>
    </asp:Repeater>


    and within the radrotator ( not working )

    <telerik:RadRotator ID="RadRotator1" runat="server" Width="224px" Height="112px"
        CssClass="rotatorStyle" ItemHeight="112px" ItemWidth="112px"
        DataSourceID="SqlDataSource1" >
        <Items>
            <telerik:RadRotatorItem>
                <ItemTemplate>
                        <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("Image") %>'
                            AutoAdjustImageControlSize="false" Width="90px" Height="110px"  />
     
                </ItemTemplate>
            </telerik:RadRotatorItem>
     
        </Items>
    </telerik:RadRotator>

    Thanks for your help!

  2. Ronan BARRANGER
    Ronan BARRANGER avatar
    24 posts
    Member since:
    Mar 2010

    Posted 12 Mar 2012 Link to this post

    NB: I already have this in my web.config file:


    <httpHandlers>
        <remove path="*.asmx" verb="*" />
        ...
        <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    </httpHandlers>
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 12 Mar 2012 Link to this post

    Hello,

    Try configuring the RadRotator as shown below.
    aspx:
    <telerik:RadRotator ID="RadRotator2" runat="server" Width="224px" Height="112px"
                CssClass="rotatorStyle" ItemHeight="112px" ItemWidth="112px" DataSourceID="SqlDataSource2">
      <ItemTemplate>
         <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("Image") %>' AutoAdjustImageControlSize="false" Width="90px" Height="110px" />
      </ItemTemplate>
    </telerik:RadRotator>

    -Shinu.
  5. Ronan BARRANGER
    Ronan BARRANGER avatar
    24 posts
    Member since:
    Mar 2010

    Posted 12 Mar 2012 Link to this post

    Thanks!

    I solved this problem one hour ago by myself but forgot to put the solution here...

    I just have another problem in the code below i'm trying to open a radWindow when i click on an image:


    <script type="text/javascript">
     
     
        function openRadWin() {
            radopen(null,"RadWindow1");
        }
     
    </script>

    <telerik:RadWindowManager ID="radwindowmanger" runat="server">
        <Windows>
            <telerik:RadWindow ID="RadWindow1" runat="server" Skin="Black">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

        
    <telerik:RadRotator ID="RadRotator1" runat="server" ItemWidth="207" Height="122"
        ItemHeight="122" DataSourceID="SqlDataSource1" Skin="Office2007" Width="620px"
        BorderColor="#FF3300" FrameDuration="7000" RotatorType="ButtonsOver" ScrollDirection="Left,Right"
        OnItemClick="RadRotator1_ItemClick">
        <ItemTemplate>
            <asp:LinkButton runat="server" ID="LinkButtonIMG" OnClientClick="openRadWin();return false;">
                <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("Image") %>'
                    AutoAdjustImageControlSize="false" Width="90px" Height="110px" Enabled="true"
                    AlternateText="pas d'image" />
                
            </asp:LinkButton>
        </ItemTemplate>
    </telerik:RadRotator>

    My window doesn't appear, the page just reloads...
    Do you have an idea where this could come from ?
    thanks again for your help!
  6. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Mar 2012 Link to this post

    Hello Ronan,

    I tried the same scenario with above code which worked as expected. Try setting OpenerElementID for the RadWindow.
    aspx:
    <telerik:RadWindowManager ID="radwindowmanger" runat="server">
    <Windows>
    <telerik:RadWindow ID="RadWindow1" OpenerElementID="LinkButtonIMG" runat="server" Skin="Black">
    </telerik:RadWindow>
    </Windows>
    </telerik:RadWindowManager>

    -Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017