摘要:导出Excel:System.IO.StringWriter sw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(sw); this.table.RenderControl(hw); Response.Clear(); Response.ContentType = "application/vnd.ms-excel"; Response.Charset = ""; Page.EnableViewState
阅读全文
摘要:方法一:View Code protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e) { CheckBox cbx = e.Row.FindControl("cbID") as CheckBox; try { //绑定选中CheckBox 客户端ID cbx.Attributes.Add("onclick", "Change(" + cbx.ClientID + ")"); } ...
阅读全文
摘要:switch <script language="javascript"> var seson = prompt("请输入数字(1~4)"); switch (seson) { case "1": msg = "你选择的春天"; break; case "2": msg = "你选择的夏天"; break; case "3": msg = "你选择的秋天"; break; case "4": msg =
阅读全文
摘要:Web DataTable dt = DAL.LoadSimple("Name");DAL中的代码 public static DataTable LoadSimple(String ToolsName) { XmlDocument xml = new XmlDocument(); xml.Load(BasePage.Request.PhysicalApplicationPath + "XML/Tools.config"); DataTable dt = new DataTable(); dt.Columns.Add("value",
阅读全文
摘要:<script type="text/javascript">self.moveTo(0,0); //移动窗口位置到(0,0)位置self.resizeTo(screen.availWidth,screen.availHeight); //控制网页窗口大小</script>
阅读全文
摘要:引言 这篇文章是应在一个ASP.NET项目中建立Microsoft Word文档的需要而写的。本文描述了怎样使用ASP.NET来创建和修改Microsoft Word文档。背景 自动化(Automation)是一个过程,它允许编程语言譬如Visual Basic.NET或C#写的应用程序可以编程控制其它应用程序。自动化到Word允许你执行像创建新文档,向文档中添加文本,邮件合并,还有控制文档格式这样的操作。使用Word和其它Microsoft Office应用程序,几乎所有你能在用户面板上手动实现的操作都可以通过自动化编程实现。Word通过一个对象模型来实现这个编程功能性(programmat
阅读全文
摘要:http://www.cnblogs.com/cloudgamer/archive/2009/12/22/ImagePreview.html
阅读全文