询问下如何在网页指定位置显示数据库中的链接地址
目前我准备用iframe来显示,
<iframe ID="I1" height="500" name="I1" src='<%# Eval("FilePath") %>'width="700"></iframe>
但是显示的是相对路径的
我在服务器数据库中保存的位置是~\art\art\xxx.mht
结果在iframe中显示的是 WWW1\USER\~\art\art\xxx.mht地址
文件结构式WWWW1
\USER\ABC.aspx(现在在做的页面) \ART\ART\XXX.MHT(准备显示在 abc.aspx中显示的文件)
目前我准备用iframe来显示,
<iframe ID="I1" height="500" name="I1" src='<%# Eval("FilePath") %>'width="700"></iframe>
但是显示的是相对路径的
我在服务器数据库中保存的位置是~\art\art\xxx.mht
结果在iframe中显示的是 WWW1\USER\~\art\art\xxx.mht地址
文件结构式WWWW1
\USER\ABC.aspx(现在在做的页面) \ART\ART\XXX.MHT(准备显示在 abc.aspx中显示的文件)
var Time = Date();
$.get("GetNotice.ashx?Date=" +Time, {},
function(sRet) {
$("#divNotify").html(sRet);
});
}
</div>
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class GetNotice : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string Head = "<marquee width='100%' onmousemove='this.stop()' onmouseout='this.start()' scrollamount='3'>";
StringBuilder detal = new StringBuilder();
string Foot = "</marquee>"; detal.AppendLine(Head); DataTable oDT = crsBLL.B_SystemNotify_Manager.GetSysNotifyToDisp(); for (int i = 0; i < oDT.Rows.Count; i++)
{
detal.AppendLine("<a href='../Announce/LookintoAnnounce.aspx?NotifyID=" + oDT.Rows[i]["NotifyID"].ToString()
+ "' target='main'>" + (i+1).ToString() + "、" + oDT.Rows[i]["NotifyTitle"].ToString() + "</a> ");
} detal.AppendLine(Foot); context.Response.ContentType = "text/plain";
context.Response.Write(detal.ToString());
} public bool IsReusable
{
get
{
return false;
}
}GetNotice.ashx