Default.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
string outputDirPath = ""; //Word和Excel转换成Html,Html文件存放的位置
protected void Page_Load(object sender, EventArgs e)
{
outputDirPath=Server.MapPath("~") + @"file\";
}
protected void btnWord_Click(object sender, EventArgs e)
{
string filePath = Server.MapPath("~") + @"DemoFiles\Test.docx";
WordPreview.Priview(this, filePath, outputDirPath);
}
protected void btnExcel_Click(object sender, EventArgs e)
{
string filePath = Server.MapPath("~") + @"DemoFiles\Test.xlsx";
ExcelPreview.Priview(this, filePath, outputDirPath);
}
protected void btnPDF_Click(object sender, EventArgs e)
{
string filePath = Server.MapPath("~") + @"DemoFiles\Test.pdf";
PDFPreview.Priview(this, filePath);
}
protected void btnTxt_Click(object sender, EventArgs e)
{
string filePath = Server.MapPath("~") + @"DemoFiles\Test.txt";
TextFilePreview.Preview(this, filePath);
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
