Div into radlistview

2 posts, 0 answers
  1. Fabio Cirillo
    Fabio Cirillo avatar
    180 posts
    Member since:
    Jan 2010

    Posted 30 Jan 2013 Link to this post

    Hi,
    i load a image asp into radlistview, this is code:
    <asp:Image ID="Image1" runat="server" ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' Height="125px" Width="110px"/>

    now i would to load the value

    CType(Container.DataItem, PropertyUtente).imageprofile

    into div so i can to create to div the round edges with css.
    But i dont know to load this code "CType(Container.DataItem, PropertyUtente).imageprofile" into div.

    i load the records into radlistview from code behind with this code:

    Dim lista As List(Of PropertyUtente) = Loadsearch.Search(_str1, _str2)
    RadListView1.DataSource = lista
    RadListView1.DataBind()


    Please help me


  2. Marin
    Admin
    Marin avatar
    1045 posts

    Posted 04 Feb 2013 Link to this post

    Hello,

     You can wrap the image inside a div element and apply the necessary styles:

    <div class="roundEges">
        <asp:Image ID="Image1" runat="server" ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' Height="125px" Width="110px"/>
        </div>

    also another option might look something like this (only in case the div is inside the template for the ListView item):
    <div class="roundEges" style="background-image:url('<%# CType(Container.DataItem, PropertyUtente).imageprofile%>')">
    </div>


    Regards,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top