L
lh
I'm trying to pass the values from the databinder.eval statmetn into a
method in the codebehind. The code below is within a Repeater.
The error that i'm currently getting is
Compiler Error Message: CS1502: The best overloaded method match for
'projectName.dspBranchAdministration.ShowPreview(string)' has some invalid
arguments
What is wrong?
Thanks
//asp.net within repeater class
<ItemTemplate>
<tr>
<td><%# DataBinder.Eval(Container.DataItem,"vcBranch")%></td> //shows
properly
<td><a href='dspEditBranch.aspx?intBranch=<%#
DataBinder.Eval(Container.DataItem,"ridBranch")%>&chk=<%#
projectName.Utility.GetRandomString(DataBinder.Eval(Container.DataItem,"ridB
ranch").ToString())%>' class="button">Edit</a></td>
<%# ShowPreview(DataBinder.Eval(Container.DataItem,"vcBranch"))%>
//doesnt work
</tr>
</ItemTemplate>
//in codebehind
protected string ShowPreview(string sitehost)
{
return "<td>wtf</td>";
}
method in the codebehind. The code below is within a Repeater.
The error that i'm currently getting is
Compiler Error Message: CS1502: The best overloaded method match for
'projectName.dspBranchAdministration.ShowPreview(string)' has some invalid
arguments
What is wrong?
Thanks
//asp.net within repeater class
<ItemTemplate>
<tr>
<td><%# DataBinder.Eval(Container.DataItem,"vcBranch")%></td> //shows
properly
<td><a href='dspEditBranch.aspx?intBranch=<%#
DataBinder.Eval(Container.DataItem,"ridBranch")%>&chk=<%#
projectName.Utility.GetRandomString(DataBinder.Eval(Container.DataItem,"ridB
ranch").ToString())%>' class="button">Edit</a></td>
<%# ShowPreview(DataBinder.Eval(Container.DataItem,"vcBranch"))%>
//doesnt work
</tr>
</ItemTemplate>
//in codebehind
protected string ShowPreview(string sitehost)
{
return "<td>wtf</td>";
}