摘要:
未将对象引用设置到对象的实例1、DataReader从数据库中取数据因为没有取到数据或取到的数据为空:比如,查询name="123",但是没有该数据2、Session对象为空:这个因为重编译或者重启iis都会造成3、没有使用new初始化对象:这个遇到的比较少4、使用了没有赋值的字符串变量。5、ViewState对象为Null6、对控件赋文本值的时候,值不存在。7、使用Request.QuerySt... 阅读全文
posted @ 2009-05-22 15:36
起源
阅读(1183)
评论(0)
推荐(0)
摘要:
在"实体类代码生成器3"中,用户可以使用C#代码来动态生成一些参数,比如代码类名生成规则,表名生成规则,初始化规则等.而要调用这些代码显然需要对代码进行运行时动态编译,幸好C#有了"万能"的反射系统,可以让我们轻松动态编译代码并调用.OK,现在详细了解下"实体类代码生成器"中的动态编译类,首先定义一个RunnerMethod对象,用来保存和方法有关的信息:C#代码 usingSystem; usi... 阅读全文
posted @ 2009-05-22 15:21
起源
阅读(813)
评论(1)
推荐(0)
摘要:
C#Control内 public delegate void SetExRichReciveHandel(string str); public void SetExRichRecive(string str) { if (this.exRichRecive.InvokeRequired) { SetExRichReciveHandel SPBH = new SetExRichReciveHan... 阅读全文
posted @ 2009-05-22 11:52
起源
阅读(211)
评论(0)
推荐(0)
摘要:
usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Net;usingSystem.Net.Sockets;usingSystem.Windows.Forms;usingSystem.Diagnostics;usingSystem.Runtime.InteropServices;namespaceClie... 阅读全文
posted @ 2009-05-22 11:45
起源
阅读(187)
评论(0)
推荐(0)
摘要:
staticvoidMain(string[]args){//打开登录窗口LoginFormlg=newLoginForm();if(lg.ShowDialog()==DialogResult.OK){Application.Run(newMainForm());//打开你指定的窗口}}登录窗口(LoginForm)中在你完成密码验证代码后加上this.DialogResult=DialogRes... 阅读全文
posted @ 2009-05-22 11:43
起源
阅读(1044)
评论(3)
推荐(0)
摘要:
<script language=javascript>function getUrl(URL) { var xmlhttp = new ActiveXObject("microsoft.xmlhttp"); xmlhttp.Open("GET",URL, false); try { xmlhttp.Send(); } catch(e){} finally { var result =... 阅读全文
posted @ 2009-05-22 11:37
起源
阅读(527)
评论(1)
推荐(0)