473,473 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CS1502: invalid arguments - DataBinder.Eval

According to research, I should convert to ToString() on my aspx but
that does not seem to work in this case. Any ideas?

CS1502: The best overloaded method match for
'AlbumForm.GetThumbnailTitleHtml(Photo)' has some invalid arguments

ASPX Page
<td>#
GetThumbnailTitleHtml(DataBinder.Eval(Container.Da taItem,"Photos(0)"))
%></td>
<td>#
GetThumbnailTitleHtml(DataBinder.Eval(Container.Da taItem,"Photos(1)"))
%></td>

CODE BEHIND
public class PageData
{
public Photo[] _photos = new Photo[4];
// return photo array (four elements)
public Photo[] Photos
{
get { return _photos; }
}
}

public string GetThumbnailTitleHtml(Photo photo)
{
if (photo == null)
{return "&nbsp;"; }
return string.Format("<a
href=\"photo.aspx?album={0}&photo={1}\"><font class='txt-photo-
links'>{2}</font></a>",
HttpUtility.UrlPathEncode(_albumList.SelectedAlbum ),photo.Title);
}

May 8 '06 #1
0 1191

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

Similar topics

0
by: Michelle Keys | last post by:
Subject: DataBinder.Eval Error! Server Error in '/MSPOS' Application. ------------------------------------------------------------------------ -------- DataBinder.Eval:...
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
1
by: Patrick.O.Ige | last post by:
Hi guys, I just moved a project from my pc to a server production (to an ISP). on my pc it all works fine with no errors. After fireing up the first page "default.aspx" i get the error...
4
by: Patrick.O.Ige | last post by:
I have this below in a Datalist:- <asp:HyperLink id="Hyperlink1" Cssclass="MenuUnselected" Text='<%# DataBinder.Eval(Container.DataItem, "cat_cities")%>' NavigateUrl='<%#...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.