J
j-in-uk
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.DataItem,"Photos(0)"))
%></td>
<td>#
GetThumbnailTitleHtml(DataBinder.Eval(Container.DataItem,"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 " "; }
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);
}
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.DataItem,"Photos(0)"))
%></td>
<td>#
GetThumbnailTitleHtml(DataBinder.Eval(Container.DataItem,"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 " "; }
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);
}