这个Default.aspx怎么传文件路径

wo22ni 2014-08-19 11:27:19
网上下了个源码,说是要Default.aspx传文件绝对路径,才开始学,看不懂,怎么传,谢谢!!

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>VIEW TIF</title>
</head>
<body>
<form id="form1" runat="server">
<div align="center">
<asp:Table runat="server" ID="_tblImgs" Height="100%" Width="100%">
<asp:TableRow>
<asp:TableCell Width="50%" BorderColor="Black" BorderStyle="Solid" BorderWidth="2">
<asp:Label runat="server" ID="_lblClickNote" Text="*Click to view bigger" Font-Size="Small"/><br />
<asp:PlaceHolder runat="server" ID="_plcImgsThumbs" /><br />
<asp:PlaceHolder runat="server" ID="_plcImgsThumbsPager" />
</asp:TableCell>
<asp:TableCell Width="50%">
<asp:PlaceHolder runat="server" ID="_plcBigImg" /><br />
<asp:HyperLink runat="server" ID="_hlRot90" Text="[Rotate Left]" Font-Underline="true" /> 
<asp:HyperLink runat="server" ID="_hlRot270" Text="[Rotate Right]" Font-Underline="true" /> 
<asp:HyperLink runat="server" ID="_hlRot180" Text="[Rotate 180]" Font-Underline="true" /> 
<asp:HyperLink runat="server" ID="_hlBig" Text="[Bigger]" Font-Underline="true" /> 
<asp:HyperLink runat="server" ID="_hlSmall" Text="[Revert]" Font-Underline="true" /> <br />
<asp:Label runat="server" ID="Label1" Text="*Actions based off original page" Font-Size="Small"/><br />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</div>
</form>

<script language="javascript" type="text/javascript">
function ChangePg(Pg) {
Src = 'ViewImg.aspx?View=1&FilePath=' + GetBigSrc("FilePath") + "&Pg=" + Pg + "&Height=" + GetBigSrc("Height") + "&Width=" + GetBigSrc("Width");
SrcBig = 'ViewImg.aspx?View=1&FilePath=' + GetBigSrc("FilePath") + "&Pg=" + Pg + "&Height=" + 1000 + "&Width=" + 1000;
SrcRevert = 'ViewImg.aspx?View=1&FilePath=' + GetBigSrc("FilePath") + "&Pg=" + Pg + "&Height=" + 600 + "&Width=" + 600;
document.getElementById('_imgBig').src = Src;
document.getElementById('_hlRot270').onclick = function() { ChangePg(Pg); document.getElementById('_imgBig').src = Src + "&Rotate=270"; };
document.getElementById('_hlRot180').onclick = function() { ChangePg(Pg); document.getElementById('_imgBig').src = Src + "&Rotate=180"; };
document.getElementById('_hlRot90').onclick = function() { ChangePg(Pg); document.getElementById('_imgBig').src = Src + "&Rotate=90"; };
document.getElementById('_hlBig').onclick = function() { ChangePg(Pg); document.getElementById('_imgBig').src = SrcBig + "&Rotate" + GetBigSrc("Rotate"); };
document.getElementById('_hlSmall').onclick = function() { ChangePg(Pg); document.getElementById('_imgBig').src = SrcRevert; };
}

function GetBigSrc(Qrystr)
{
var Qry = document.getElementById('_imgBig').src;
//alert(Qry);
gy = Qry.split("&");
for (i=0;i<gy.length;i++)
{
ft = gy[i].split("=");
if (ft[0] == Qrystr)
return ft[1];
}
}

</script>
</body>
</html>

...全文
87 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
devmiao 2014-08-19
  • 打赏
  • 举报
回复
贴出你所看到的完整信息。

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧