📄 clientbuildmanager.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Compilation;
public partial class ClientBuildManager : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
//预编译
protected void btnCompiler_Click(object sender, EventArgs e)
{
/*您也可以这样写
string vdir = "/MyDataSource"; //虚拟目录名称
string srcLocation = "c:\\Inetpub\\wwwroot\\VS2005IDE"; //来源位置
string tarLocation="c:\\Tmp\\VS2005IDE"; //目标位置
System.Web.Compilation.ClientBuildManager cbm = new System.Web.Compilation.ClientBuildManager(vdir,srcLocation,tarLocation);
cbm.PrecompileApplication(); //预编译
* */
try
{
if (!(String.IsNullOrEmpty(txtVirtualDir.Text) && String.IsNullOrEmpty(txtSourceLocation.Text) && String.IsNullOrEmpty(txtTargetLocation.Text)))
{
System.Web.Compilation.ClientBuildManager cbm = new System.Web.Compilation.ClientBuildManager(txtVirtualDir.Text, txtSourceLocation.Text, txtTargetLocation.Text);
cbm.PrecompileApplication(); //预编译
txtMsg.Text = "预编译成功!";
}
else
{
txtMsg.Text = "TextBox不得为空白";
}
}
catch(Exception ex)
{
txtMsg.Text = ex.ToString();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -