This is my front end code...
<asp:Repeater ID="RepContest" runat="server">
<ItemTemplate>
<div class="col-md-4">
<img alt="" src='<%# GetImage(Eval("ContestID").ToString())%>' />
</div>
</ItemTemplate>
</asp:Repeater>
I'm getting error on GetImage function. the error is 'The Name GetImage does not exist in current context'..
and here is the backend code
public string GetImage(string _id)
{
long contestID = Int64.Parse(_id.ToString());
string imagePath = "";
try
{
dtable = objDL.GetData("usp_MasterContest", "@ContestID", contestID, "GetBannerImage");
if (dtable.Rows.Count > 0)
{
string imageName = dtable.Rows[0]["BannerImageName"].ToString();
imagePath = "Files\\BannerImage\\" + "Contest" + contestID + "\\" + imageName.ToString();
}
}
catch (Exception ex)
{
objLog.AddtoLogFile(ex);
}
return imagePath;
}
Thanks in Advance