473,786 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to embed image control in a repeater?

Hi,

I have a repeater in my vb.net page which needs to render an image
control (it's a mappoint linedrive map image). The repeater itself is
bound to an array of object 'Directions' which contains mostly
strings, but one of the Properties of the Direction Class is an image
of type System.Web.UI.W ebControls.Imag e.

Obviously, if I try to render it in the repeater with the same
technique used for a string:

<%# Convert.ToStrin g(DataBinder.Ev al(Container.Da taItem,
"LDMapImage ")) %>

I get a string of 'System.Web.UI. WebControls.Ima ge' instead of the
image itself.

I know I can do this with a table control but code using a repeater is
already in place so I'd prefer to use it. Can I do this with a
repeater and if so how?

Many thanks in advance,

Matthew.
Nov 18 '05 #1
1 2396
M K
You need to get the uri of the image into the repeater. Is 'LDMapImage' an object? And if so, can you get the path/uri/url attribute of it? Maybe LDMapImage.Path or something like that?

"Matthew Law" wrote:
Hi,

I have a repeater in my vb.net page which needs to render an image
control (it's a mappoint linedrive map image). The repeater itself is
bound to an array of object 'Directions' which contains mostly
strings, but one of the Properties of the Direction Class is an image
of type System.Web.UI.W ebControls.Imag e.

Obviously, if I try to render it in the repeater with the same
technique used for a string:

<%# Convert.ToStrin g(DataBinder.Ev al(Container.Da taItem,
"LDMapImage ")) %>

I get a string of 'System.Web.UI. WebControls.Ima ge' instead of the
image itself.

I know I can do this with a table control but code using a repeater is
already in place so I'd prefer to use it. Can I do this with a
repeater and if so how?

Many thanks in advance,

Matthew.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
9563
by: nicholas | last post by:
Got an asp.net data-repeater on my page. I can view the texts from the database (ex.: <%# Databinder.Eval(Container.DataItem, "contentEN") %> ), but I also would like to see the image, but only if there is one. So in the repeater there should be someting like: if ( the_image_field <> "" ) then show the image with the filename from the database field end if
6
1378
by: WebMatrix | last post by:
Hello, Here's the situation (I'll try to be brief as possible) I am working on the control which is created dynamically based on XML string. This control consists of a table with number of rows with 3 columns; TextBox, dropdown and a button ("Delete" button) in each column. Also there's one button at the bottom of the table that allows users to add more rows. So more controls will be added programmatically as user adds more rows. What's...
3
1430
by: Jim via DotNetMonster.com | last post by:
Hi, I have the location of an image in the database and I'm displaying it with a repeater control. I'd like to add the width and height and I'm not sure what the best way to do it is. I could add the fields to the database and lookup the size and enter it. I know with .Net there's a way to find out the size but I'm not sure how to go about doing it. This is the repeater control: <ASP:Repeater id="RepeaterMediaName" runat="server"...
1
3445
by: snicks | last post by:
I have a series of XLS files which I need to embed into a PowerPoint presentation on an IIS server. I’ll be using VB.NET. I’ve tried using an ASPOSE.PowerPoint control to do this and it does partially work. The problem is that when I embed the XLS files PowerPoint is not running and has no way of capturing the XLS image and embedding it into the PPT. When the user opens the PPT they are presented with hundreds of “Object...
0
1592
by: Milsnips | last post by:
hi there, i have a repeater with 1 image control. I also have a function that generates a dynamic thumbnail from an image, and returns it as a stream, but i cant figure out how to bind it to the control, as the webcontrols.image control only has an ImageURL which is a string value. so what i need is to put the system.drawing.image object into the webcontrols.image control.
3
3247
by: BB | last post by:
Hi, I am using repeater control.in my aspx page. one of the column of control displays images. Filenames of images are stored in table. Now when I run it and if display Image is blank. I see place holder and red cross in it in Internet Explorer. But it works fine in FireFox. Is there any way to fix this so that in both browers I can see same ie hide placeholder and red cross? I have tried to use alternatetext property for image control. ...
2
1600
by: sanju | last post by:
Hi, I am struggling to replace a bit value 'True' or 'False' with a image true.gif or false.gif and bind it to a repeater control. I am getting values 'true' or 'false' depending on whether user is logged in or not(with asp.net membership provider) Getting true or false with this <%# Membership.GetUser(Eval("UserID")).IsOnline % and
0
2081
by: Sully | last post by:
Hi Guys, I have this about 98% done and I cannot get it work properly. I have a Repeater bound to a MySQL DataSource, inside the Repeater I have an ImageButton, outside the repeater I have a Image, code is below: <asp:Image ID="imgLarge" Name="imgLarge" runat="server" AlternateText="Large Custom Image" Height="300" Width="400" /> <asp:Repeater ID="rptSmall" runat="server" OnItemDataBound="rptSmall_ItemDataBound1">
1
1132
by: vikastcser | last post by:
Hi I have a image in a Repeater.I have to display some value in its alternate text property along with the text. The value is accesed as <%#(Container.DataItem.Amt)%> as it is in repeater. Can i do this in aspx file like : <asp:Image ID="Img" ImageUrl="~/money.gif" AlternateText="My text appears here with value '<%#(Container.DataItem.Amt)%>' " runat="server" Height="20px" Visible="true" /> I want to do that in aspx file only not in...
0
9650
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8992
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6748
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.