44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
|
|
using BLL;
|
|||
|
|
using System;
|
|||
|
|
|
|||
|
|
namespace FineUIPro.Web.AttachFile
|
|||
|
|
{
|
|||
|
|
public partial class LookPic : PageBase
|
|||
|
|
{
|
|||
|
|
protected void Page_Load(object sender, EventArgs e)
|
|||
|
|
{
|
|||
|
|
if (!IsPostBack)
|
|||
|
|
{
|
|||
|
|
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
|||
|
|
|
|||
|
|
var url = Request.Params["fileUrl"];
|
|||
|
|
//var Baseurl = "https://view.officeapps.live.com/op/embed.aspx?src=";
|
|||
|
|
// var Baseurl = "https://view.xdocin.com/view?src=";
|
|||
|
|
var Fileurl = Funs.SGGLUrl + url.Replace(Funs.RootPath, "");
|
|||
|
|
//var newurl = "";
|
|||
|
|
//var FiletExtension = Path.GetExtension(url);
|
|||
|
|
//if (FiletExtension == ".docx" || FiletExtension == ".doc" || FiletExtension == ".xls" || FiletExtension == ".xlsx")
|
|||
|
|
//{
|
|||
|
|
// newurl = Baseurl + Fileurl;
|
|||
|
|
//}
|
|||
|
|
//else if (FiletExtension == ".txt" || FiletExtension == "pdf")
|
|||
|
|
//{
|
|||
|
|
// newurl = Fileurl;
|
|||
|
|
//}
|
|||
|
|
//else
|
|||
|
|
//{
|
|||
|
|
// newurl = Fileurl;
|
|||
|
|
//}
|
|||
|
|
|
|||
|
|
this.LookHtml.Src = Fileurl;
|
|||
|
|
this.Tab1.IFrameUrl = Fileurl;
|
|||
|
|
//StreamReader fread = new StreamReader(url, System.Text.Encoding.GetEncoding("gb2312"));
|
|||
|
|
//string ss = fread.ReadToEnd();
|
|||
|
|
//Response.Write(ss);
|
|||
|
|
//fread.Close();
|
|||
|
|
//fread.Dispose();
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|