变量在页面里怎么绑定?
代码如下:
if(ACdr.Read())
{
this.Title.Text=ACdr["FileTitle"].ToString();
this.Content.Text=ACdr["Remarks"].ToString().Replace("\n","<br>");
string spath=ACdr["Path"].ToString();
this.fileTime.Text=ACdr["Recvdate"].ToString();
this.Fileman.Text=ACdr["Fileauthor"].ToString();
}
想要在页面里绑定spath变量,<%# spath %>
运行时出现:CS0103: 名称“spath”在类或命名空间“ASP.detailfile_aspx”中不存在
怎么办呀?