页面的调用语句:
<td class="unnamed12"><%# View("0")%></td>后台定义的函数:
public void View(string ReplyFlag)
{
if (ReplyFlag=="0")
{
Response.Write("Not Reply");
}
else
{
Response.Write("Reply");
}
}
错误提示:
CS1502: The best overloaded method match for 'System.Convert.ToString(object)' has some invalid arguments

解决方案 »

  1.   

    无效参数啊。
    <td class="unnamed12"><%# View("0")%></td>
    好象不能这样写吧。
      

  2.   

    我也知道是参数不对啊,但我知道该怎么写啊才是对的啊.而且我感觉我调用是写对了,因为我直接在后台View("0")是对的啊
      

  3.   

    后台定义的函数:
    public string View(string ReplyFlag)
    {
    if (ReplyFlag=="0")
    {
    return "Not Reply";
    }
    else
    {
    return "Reply"; }
    }
      

  4.   

    <td class="unnamed12"><%= View("0")%></td>