This is a migrated thread and some comments may be shown as answers.

Div into radlistview

1 Answer 59 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Fabio Cirillo
Top achievements
Rank 1
Fabio Cirillo asked on 30 Jan 2013, 10:30 AM
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


1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 04 Feb 2013, 11:14 AM
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.
Tags
ListView
Asked by
Fabio Cirillo
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or