页面的调用语句:
<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
<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
<td class="unnamed12"><%# View("0")%></td>
好象不能这样写吧。
public string View(string ReplyFlag)
{
if (ReplyFlag=="0")
{
return "Not Reply";
}
else
{
return "Reply"; }
}