上一页 1 ··· 4 5 6 7 8 9 下一页
ashx 文件的作用ashx 文件的作用(转载)作者:舞指如歌 2007-11-01 10:16:03 标签: IT/科技 .ashx 文件用于写web handler的。其实就是带HTML和C#的混合文件。当然你完全可以用.aspx 的文件后缀。使用.ashx 可以让你专注于编程而不用管相关的WEB技术。.ashx必须包含IsReusable. 如下例所示 1 2 3 using System; 4 using System.Web; 5 6 public class AverageHandler : IHttpHandler 7 { 8 public bool IsReusable ... Read More
posted @ 2013-08-04 11:02 lanacon Views(381) Comments(0) Diggs(0) Edit
虽说已经学了很久数据库的连接和使用,但是感觉一直都没有真正的记住什么。没办法,只有写出来,加强记忆了。数据库是对立存在的。ado.net其实是一个类库,其中包含大量的类,利用这些类的对象,可以完成对数据库的操作。ado.net五个常用对象。connection 数据库的连接对象,用于对数据库的连接command 用于执行数据库命令,同时也提供从数据库中检索,插入,修改,删除 数据的功能。DataSet DataSet对象是数据在内存中的表现形式。他包含了DataTable对象,而datatable 包含了列和行,就像数据库中的表一样DataAdapter 数据库适配器,DataSet对象和数据 Read More
posted @ 2013-08-03 15:37 lanacon Views(262) Comments(0) Diggs(0) Edit
在html中:name指的是用户名称,ID指的是用户注册是系统自动分配给用户的一个序列号。name是用来提交数据的,提供给表单用,可以重复;id则针对文档操作时候用,不能重复。如:document.getElementById();一、ID是在客户端脚本里用!NAME是用于获取提交表单的某表单域信息,在form里面,如果不指定Name的话,就不会发送到服务器端,所以有name属性的控件,必须指定name。二、以下元素input、select、form、frame、iframe用name,而以下元素table、tr、 td、div、p、span、h1、li用id,表单元素(form input Read More
posted @ 2013-08-03 15:28 lanacon Views(3997) Comments(0) Diggs(0) Edit
在c#中我们为什么要使用属性呢? 答:不让所有人对变量随便使用,或为变量设置读写条件,利于类的安全性和封装性。属性的访问器包含与获取(读取或计算)或设置(写)属性有关的可执行语句。访问器声明可以包含 get 访问器或 set 访问器,或者两者均包含。声明采用下列形式之一:get {}set {}get 访问器get 访问器体与方法体相似。它必须返回属性类型的值。执行 get 访问器相当于读取字段的值。以下是返回私有字段 name 的值的 get 访问器:private string name; // the name fieldpublic string Name // the Name pr Read More
posted @ 2013-08-03 15:19 lanacon Views(360) Comments(0) Diggs(0) Edit
有时候我们的类没有必要再被继承的必要,或者我们编写的类不想被继承,那么我们就要使用密封类了。密封类在声明的时候,使用sealed修饰符,如果想继承一个密封类,那么c#会提示报错,所以,密封类不可能有派生类。 1 public sealed class sealed_test 2 { 3 public sealed_test() 4 { 5 Console.WriteLine("父类构造方法"); 6 } 7 private void sayhello() 8 { 9 C... Read More
posted @ 2013-08-02 17:54 lanacon Views(338) Comments(0) Diggs(0) Edit
委托就是定义了方法的类型,就想"hello" 的类型是String 类型一样。例如:下面的委托例子 1 namespace delegate_tesst 2 { 3 public delegate void SayDelegate(string name); 4 public class ClassPeople 5 { 6 public void saychinese(string name) 7 { 8 Console.WriteLine("你好,"+name ); 9 }10 p... Read More
posted @ 2013-08-02 16:29 lanacon Views(209) Comments(0) Diggs(0) Edit
需要的软件:tomcatsqljdbc.jareclipse安装步骤:1.将paltform2013-06-17.war文件夹重新命名为platform2.在新建一个文件夹(文件夹名字自定,这里用“xinlian”)3.将下载好的tomcat拷贝到这个xiinlian文件夹下,4.进入tomcat->lib目录下,将sqljdbc.jar拷贝到这个目录下5.进入到tomacat->webapps->将platform 文件夹拷贝到这里6.进入platform文件夹中,找到WEB-INF->dsn.xml(更改这里进行数据源的更改)将数据给改如下: 1 2 3 4 sys Read More
posted @ 2013-07-27 16:46 lanacon Views(245) Comments(0) Diggs(0) Edit
If we want to build a program about RadioGroup and RadioButton ,we should do following works.First,create MainActivity.java,activity_main.xmlthen ,bind the MainActivity.java with activity_main.xmlnext,add the next code at activity_main.xmlcode: 1 5 6 7 15 16 23 View Code in order ... Read More
posted @ 2013-07-01 12:55 lanacon Views(230) Comments(0) Diggs(0) Edit
在这里我们通过一个例子来演示这四个控件的使用方法//我们要做一个两个文本框,一个Button,点击Button后跳转到另外一个Activity中,显示这两个数的计算结果点击按钮后跳转到另外一个activity中,并显示计算的结果首先我们先建立两个activityMainActivity和ResultActivity并建立两个页面控制文件activity_main.xml和activity_result.xmlactivity_main.xml中的代码如下: 1 10 16 17 24 25 34 35 36 37 38 46 47 Vie... Read More
posted @ 2013-06-29 14:56 lanacon Views(1078) Comments(0) Diggs(0) Edit
其实和普通的activity一样,只是在AndroidManifest.xml中进行注册时候改成 就可以了最后运行的结果如下: Read More
posted @ 2013-06-25 13:37 lanacon Views(253) Comments(0) Diggs(0) Edit
上一页 1 ··· 4 5 6 7 8 9 下一页