摘要:一、DataTable和xls文件的相互转换;(1)xls转DataTable 服务端不必启动Excel.exe进程 /// <summary> /// xls文件的某个sheet转成表 /// 备注:此方法不会启动服务端的Excel进程 /// </summary> /// <param name="strExcelFileName">xls路径</param> /// <param name="strSheetName">xls中的某张sheetName</param> ///
阅读全文
摘要:服务端 ScriptManager.RegisterStartupScript(this, this.GetType(), "JSFunction", "clickAWord();", true);客户端:<script type="text/jacascript"> function clickAWord() { alert("Hello World"); document.getElementById("tempA").click(); //触发A元素的click事件,跨浏览器
阅读全文
摘要://导出工程放线通知单 private void butn_exportDrawLinePermission_Click(object sender, EventArgs e) { string tempdotpath = Application.StartupPath + "\\报表文件"; tempdotpath += "\\" + "规划放线通知单.dot"; //获取模板 SaveFileDialog sfd = new SaveFileDialog(); ...
阅读全文
摘要:以SQLServer版本为例(1)解压得到“系统文件”目录,在IIS中发布系统目录。(2)右键“系统文件”添加用户Asp.NET账户,并且赋予“修改”和“写入”的权限。(3)访问网站/install(4)添加数据库连接。 >在本地sqlserver中新建数据库,添加用户名和密码。然后测试连接 >在安装页面上添加后台登陆名和密码。(5)完成安装。 访问页面就可看到网站效果。
阅读全文
摘要:(1)新建ASP.NET MVC3 Application-->选择Internet Application 模版。 (需要.NET Framework 4.0, 并安装Visual Studio 2010)(2)在Model目录下添加类Movie.cs。 包含Movie Model和 Movie DbContext 两个类。(需要使用Entity Framework,该框架包含在vs 2010中) 代码如下namespace MVC3_Application.Models{ public class Movie { public int ID { get; set;...
阅读全文
摘要:The Entity Framework (often referred to as EF) supports a development paradigm called Code First. Code First allows you to create model objects by writing simple classes. (These are also known as POCO classes, from "plain-old CLR objects.") You can then have the database created on the fly
阅读全文
摘要:<h2>Welcome</h2> <ul> <% for (int i = 0; i <= Convert.ToInt32(ViewData["numtime"]); i++) {%> <li><%= ViewData["Message"].ToString() %></li> <% } %> </ul>"{" 是语言的一部分,肯定要写在 <%%>中二、ASP.NET 指令(<%@%>)Master
阅读全文
摘要:Model:数据和业务规则 data and business rulesView: 结果展示 output and representationController: 把用户输入 转变成 Model能处理的数据访问localhost/Home/index.aspx,实际机制:HomeControl.cs中的 Action index;返回机制:返回Views/Controller/index.aspx总结:请求aspx时,是请求control类下的action方法 返回views时,是返回View目录下的Control类的action.aspx.入门文章C1http://www.cnblog
阅读全文
摘要:右键点击类的方法,能够导航到定义,但编译的时候总是报错。原因: 两个类重名或者 类与 ashx重名解决方式: 添加 命名空间.类名.方法名来调用方法
阅读全文
摘要:http://www.cnblogs.com/Leo_wl/archive/2010/06/12/1757148.html
阅读全文
摘要:相关博客:http://www.cnblogs.com/hkncd/
阅读全文
摘要:function onload(){ try{ axEarth.globe.createInstance(dv_earth,onCreated,onCreateFail); } catch(e){ //earthclienturl 是一个<a></a> if(e.description=="'Event' 为空或不是对象") { var senti = confirm("未安装axEarth客户端,是否下载客户端?"); ...
阅读全文