ITeye博客

代码备忘录

liuway · 共 40 篇文章

js 弹出一次窗口

var open=document.cookie; var date=new Date(); if (open.indexOf("open")<0) { window.open("ah.aspx"); document.cookie="open=true;expires="+date.setTime(date.getTime()+24*3600*1000).toGMTString()+";path=/"; }

2010-01-25 10:50 · javascript · 评论(0)

解决js写的Cookie .net读取不到

加入"path=/",没有加入这个的话.net读取不到..花了很长时间才发现是这个问题

2010-01-25 10:49 · javascript · 评论(0)

ipchange

public string ipChange(uint ip) { string result=""; uint temp; for (int i = 3; i >= 0; i--) { temp = ip>> (8 * i); // ip -= temp << (8 * i); ip = ip << (8*(4-i)); ip = ip >> (8 * (4 - i)); result += temp.ToString() + "."; } result = result.Remove(result.Length-1, 1); return result; /* * string resu…

2009-11-23 21:00 · .net · 评论(0)

js触发.net验证控件

Page_IsValid 检验页面中的所有输入是否都合法,返回布尔值 Page_Validators 当前页面中所有验证控件所形成的一个数组 Page_ValidationActive 为一个布尔值,表明是否执行验证功能,设置为false则关闭验证功能。 Isvalid 该属性验证客户端的输入是否合法 ValidatorEnable(val, enable) 该方法将某个验证控件作为传递参数,启动或禁止该控件使用验证功能,在客户端起作用 C# js触发验证控件。 var event; if (!event) { event = window.event; } //Page_Validatio…

2009-09-22 14:51 · javascript · 评论(0)

C# excel

using System; using System.IO; using System.Text; using System.Data; using System.Reflection; using System.Diagnostics; using System.Collections; //using cfg = System.Configuration; namespace GDBI.Common { /// <summary> /// 说 明:Excel输出打印模块 /// 暂时不提供操作Excel对象样式方法,样式可以在Excel模板中设置好 /// 作 者:lingyun_k /…

2009-09-17 13:09 · .net · 评论(0)

遍历类的属性

Response.Write(getProperties(l1.Quote)); //项目中的代码。这样也没有遍历所有的 属性的属性吧,, public string getProperties<T>(T t) { string tStr = string.Empty; if (t == null) { return tStr; } System.Reflection.PropertyInfo[] properties = t.GetType().GetProperties(System.Reflection.BindingFlags.Instance | System.Reflection…

2009-08-12 11:23 · .net · 评论(0)

一个计算机学习网站

在准备一个计算机学习网站 www.jsjxy.com.cn 大多数人,不管是读大学还是在培训机构,计算机的专业知识主要还是来自于自已自学,在学习的过程中,找到好的教程是非常重要的一件事, 在浩渺的网络中寻找的时候,很容易迷失方向,而且网上好多教程都是东一篇西一篇的,非常的不系统。所以就决定做一个这样的网站,把好的系列教程搜集起来, 以方便后面的同学学习,计算机学院是一个专业的免费的计算机教程网站,其内容均是系列教程,使用户可以用心的系统的学习,而不是漫无目的看教程,提高学习效率。 如果你有好的教程,请发给我,我收集起来分享给更多有需要的人,谢谢。 Email: liuway20@foxmai…

2009-08-05 15:37 · 评论(0)

SqliteHelper

using System; using System.Collections.Generic; using System.Text; using System.Data.SQLite; using System.Data; namespace DB { public class SqliteHelper { /// <summary> /// 获得连接对象 /// </summary> /// <returns></returns> /// public static readonly string Conn = PubConstant.ConnectionString; public st…

2009-07-27 14:46 · .net · 评论(0)

网址收藏

http://www.cnblogs.com/artech/archive/2007/02/26/656901.html 我的WCF之旅(1):创建一个简单的WCF程序 一步一步学Silverlight 2系列(2):基本控件 http://www.cnblogs.com/Terrylee/archive/2008/03/07/Silverlight2-step-by-step-part2.html http://www.cnblogs.com/jillzhang/archive/2008/02/17/1071521.html WCF从理论到实践(7):消息交换模式 NET设计模式系列文章 …

2009-07-23 14:50 · .net · 评论(0)

。net常用工具

ildasm:反编译.net程序; ilasm:编译il代码; Reflector:查看.net程序源码、程序集间的依赖关系; Xenocode Fox 2007:由.net程序生成.net工程; PEBrowseDbg:动态调试.net程序; WinDbg,OlleyDbg:调试分析程序; MASMPlus:查看编写编译汇编代码; DebugTrack:跟踪程序调试信息; eXeScope,PE Explorer:查看PE文件,修改程序资源; Code Smith:代码生成; Dis#:.net流程反混淆工具; CFF Explorer:.net PE文件查看器; CLRProfiler:…

2009-07-23 14:48 · .net · 评论(0)

asp生成Excel

<!--#include file="Cls\ExcelControl.asp"--> <!--#include file="Cls\ExcelControl.asp"--> <% Dim ObjExl,AdoRs Set ObjExl=New ExcelMarker Set AdoRs=con.Execute("select * From Address") Response.ContentType="application/vnd.ms-excel" Response.Write ObjExl.getExcelHtml(AdoRs) AdoRs.Close con.Close Set A…

2009-07-23 14:48 · 其它代码 · 评论(0)

c#生成Excel

using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.L…

2009-07-23 14:45 · .net · 评论(0)

C#操作Word!

using System; using System.ComponentModel; using System.Data; using System.Windows.Forms; using Word = Microsoft.Office.Interop.Word; namespace ImportExportToOffice { public class ImportExportToWord { private Word.ApplicationClass oWordApplic; private Word.Document oDoc; private const string strFil…

2009-07-23 14:44 · .net · 评论(0)

验证控件网页代码分析2

还有一个子程序是更新整个页面的验证状态: //更新整个页面的验证状态 function ValidatorUpdateIsValid() { Page_IsValid = AllValidatorsValid(Page_Validators); } //检查所有验证控件,一个未通过,就返回不通过 function AllValidatorsValid(validators) { if ((typeof(validators) != "undefined") && (validators != null)) { var i; for (i = 0; i < validators.length;…

2009-07-23 14:43 · .net · 评论(0)

验证控件网页代码分析

如果我们在文本框中什么都没有输入,直接点击按钮,则激发Button1的onclick事件,执行 javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("Button1", "", true, "", "", false, false)) 分解开来,则是先执行 new WebForm_PostBackOptions("Button1", "", true, "", "", false, false) 再执行 WebForm_DoPostBackWithOptions(...) W1 //设置好各个参数 func…

2009-07-23 14:38 · .net · 评论(0)