在.AspX 怎么显示不出来我调用的信息?
在.CS中
public string GetFilePath(int wordID)
{
string filePath = string.Empty;
filePath = Server.UrlEncode(Convert.ToString(SqlHelper.ExecuteScalar(SqlHelper.LocalSqlServer, "select ExpertAuditFile from EditorDistributionWord where wordid=" + wordID)));
return filePath;
}
//mutiExpertID 是数组 例如:134,123,221, 对应的名 张三,李四,王二,
public string GetMutiFilePath(string mutiExpertID,string mutiExpertName)
{
string[] subid = mutiExpertID.Split(',');
string[] subname = mutiExpertName.Split(',');
string _name = string.Empty;
for (int i = 0; i < subid.Length; i++)
{
if (_name != string.Empty)
{
_name += " <a href=downfile.aspx?FileName=" + Server.UrlEncode("审稿单") + "&FilePath=" + GetFilePath(Convert.ToInt32(subid[i])) + ">" + subname[i] + "</a>";
}
_name= Server.UrlEncode(_name);
}
return _name;
}
.AspX
<asp:TemplateField HeaderText="审稿单" SortExpression="IsState" ItemStyle-HorizontalAlign="center">
<ItemTemplate>
<%# GetMutiFilePath(Eval("SendExpertID").ToString(), Eval("SendExpert").ToString())%>
<a href="downfile.aspx?FileName=<%# Server.UrlEncode("审稿单") %>&FilePath=<%# GetFilePath(Convert.ToInt32(Eval("ID"))) %>">下载</a>
</ItemTemplate>
</asp:TemplateField>
我这么用
<%# GetMutiFilePath(Eval("SendExpertID").ToString(), Eval("SendExpert").ToString())%>
怎么显示不了我想要的链接