<table width="542" align="center" cellpadding="0" cellspacing="0">
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<tr>
<td height="30px">
<a href="<%# Page.ResolveUrl(ChinaSoft.Utility.AppConfig.UploadFilePath.Replace("image", "file") + ((System.Data.DataRowView)Container.DataItem)["url"])%>" title="<%# ((System.Data.DataRowView)Container.DataItem)["title"]%>">
<asp:Literal ID="labtitle" runat="server" Text='<%# ((System.Data.DataRowView)Container.DataItem)["title"] %>'></asp:Literal></a>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<a href="<%# Page.ResolveUrl(ChinaSoft.Utility.AppConfig.UploadFilePath + ((System.Data.DataRowView)Container.DataItem)["url"])%>"
我调用公司的一个方法下载word或者Excel文档,可我看在公司的程序是带有Replace("image", "file"),可以正常下载,我做的程序,不能加Replace("image", "file"),加上报错“未将对象引用到实例!”,那位高手指导一下!
<a href="<%# Page.ResolveUrl(ChinaSoft.Utility.AppConfig.UploadFilePath.Replace("image", "file") + ((System.Data.DataRowView)Container.DataItem)["url"])%>"
ChinaSoft.Utility
ChinaSoft.Utility.AppConfig
ChinaSoft.Utility.AppConfig.UploadFilePath
Container
Container.DataItem看看这些里面不是namespace的有没有地方是NULL了
这玩意引用了么。
就是这句错了:
Page.ResolveUrl(ChinaSoft.Utility.AppConfig.UploadFilePath.Replace("image", "file")+...
我如果这样
Page.ResolveUrl(ChinaSoft.Utility.AppConfig.UploadFilePath+...
可以显示页面,下载不了
不是这里,是Replace("image", "file"),出的问题?
是的,我以加替换的就报错了!不用引用DLL