随笔分类 - C#
关于C#学习笔记
摘要:方法一: 利用DataKeys:GridView上只绑定你要显示的列,然后设置Gridview的DataKeyName="要隐藏的列" 读取时用GridView1.DataKeys[i]["要隐藏的列"]即可!方法二:在GridView1_RowCreated 事件里面写入:
阅读全文
posted @ 2010-01-23 14:55
Leo Tin
摘要:使用Button:[代码]使用LinkButton:[代码]无论使用LinkButton还是Button只要打开生成的页面代码就很清楚了.
阅读全文
posted @ 2009-10-06 16:08
Leo Tin
摘要:把asp:BoundField的Visible设置为false,肯定取不到值。两种方法:1。设置width=02。创建Row后立即隐藏。protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { e.Row.Cells[0].Visible = false; e.Row.Cells[1].Visible ...
阅读全文
posted @ 2009-02-26 15:39
Leo Tin
摘要:用C#+ODBC做的BS系统,在VS2005里面调试没有问题,但是发布后就会出现"ERROR [IM002] [Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序"的错误,问题在于DSN建立的类型不对.在"ODBC数据源管理器"中,设置用于连接数据库的DSN有三种: 用户DSN、系统DSN和文件DSN.IIS是系统级的NT服务,因此无法访问"用户DNS"建立的...
阅读全文
posted @ 2008-12-27 16:02
Leo Tin
摘要:可以将下文存为.reg文件双击导入注册表后解决。[代码]
阅读全文
posted @ 2008-12-17 17:20
Leo Tin
摘要:获取IPRequest.ServerVariables["LOCAL_ADDR"].ToString()获取域名Request.ServerVariables["SERVER_NAME"].ToString()获取语言Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"].ToString()获取端口Request.ServerVariables["SERV...
阅读全文
posted @ 2008-12-17 13:39
Leo Tin
摘要:来自:http://www.lokcore.com/avrilxu/article.asp?id=32从客户端中检测到有潜在危险的 Request.Form 值由于在.net中,Request时出现有HTML或Javascript等字符串时,系统会认为是危险性值。立马报错上面的错误。解决办法:解决方案一: 在.aspx文件头中加入这句: <%@ Page validateRequest="f...
阅读全文
posted @ 2008-12-11 14:58
Leo Tin
摘要:1.首先,必须导入空间"Microsoft.Win32"2.利用Registry类,确定注册表的分支(ClassesRoot,CurrentUser,Users,LocalMachine,CurrentConfig)[代码][代码]3.创建/打开/删除注册表项[代码]4.创建/打开/删除键值[代码]5.最后贴出两个判断函数[代码]
阅读全文
posted @ 2008-12-08 15:42
Leo Tin
摘要:function showborder(){ var len=document.all("GridView1").rows.length; document.getElementById("GridView1").rows[len-1].cells[4].style.border="1px solid #0000FF"; alert(document.getElementById("GridVi...
阅读全文
posted @ 2008-12-08 11:29
Leo Tin
摘要:读取Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> protected void Page_Load(object sender, EventArgs e) { CheckLogin MyChk =...
阅读全文
posted @ 2008-12-02 16:25
Leo Tin

浙公网安备 33010602011771号