摘要: form 中method ="post"与method ="get"的区别在于。(1)get:通过URL传值,在URL可以看得到。 post:提交的表单是隐藏在HTTP报文里面的,在URL可以看不得到.例子:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://w 阅读全文
posted @ 2011-04-12 17:26 Bruce.陈 阅读(181) 评论(0) 推荐(0)
摘要: 基于ashx方式的ASP.Net开发。主要理解WebForm开发中的 ispostback 和 《请求-处理-响应》的流程。做了一个ashx方式数字自增页面。Handler.ashx页面<%@ WebHandler Language="C#" Class="Handler" %>using System;using System.Web;public class Handler : IHttpHandler{ public void ProcessRequest(HttpContext context) { context.Response. 阅读全文
posted @ 2011-04-12 17:16 Bruce.陈 阅读(291) 评论(0) 推荐(0)
摘要: js中函数的概念: function add(i1,i2) { return i1 +i2 ; } var i3=add (1,2); alert(i3);var 声明变量就可以了,没var也可以,不过会默认变量为全局变量,很少这样用。js为弱类型语言。写法不会需要太严格。js中的匿名函数 var f1=function (i1,i2){return i1 +i2;} f1(3,5); alert (function (i1,i2){return i1 +i2;}(3,5));//... 阅读全文
posted @ 2011-04-09 13:21 Bruce.陈 阅读(322) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 聊天机器人_面向对象{ class Program { static void Main(string[] args) { person p = new person(); p.Name = "bobi"; p.Eat(5); p.live = true; p.Sa... 阅读全文
posted @ 2011-04-06 22:07 Bruce.陈 阅读(319) 评论(0) 推荐(0)
摘要: 学习了 传智播客 聊天机器人的原理,自己写了个聊天机器人using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 控制台基础联系{ class Program { static void Main(string[] args) { Console.WriteLine("你好!我是机器人"); int Fulllevel = 5;//设置饥饿指数 while (tru... 阅读全文
posted @ 2011-04-06 22:03 Bruce.陈 阅读(433) 评论(0) 推荐(0)
摘要: 面向对象的C#类的概念private:表明的类的封装性,外界不能访问,内部函数可以对它进行处理。字段不能用public ,这样破坏了类的封装性。属性的概念。属性大写字母开头,字段小写开头private int age;public int Age{get;set};等价于public int Age{ set{age=value}; get{return age};}Static 的静态成员,不需要实例就可以使用。体会~~~Static class help{ public Static void read() { console.writeline("让我来帮助你"); 阅读全文
posted @ 2011-04-06 21:55 Bruce.陈 阅读(130) 评论(0) 推荐(0)
摘要: 类型转换有两种 Cast,Convert。Cast 为同类型的隐式转换(int)Number;Convert 为类型的转变:Convert.ToInt32();Convert.ToString() 用于不同类型的转换;例:String str=Console.ReadLine();int Int_str=Convert.ToInt32(str);数组:int[] values={30,20,50};values.length 等用法。。。。int []nums=new int[3];int []nums=new int[3]{20,30,50};Foreach用法:试用与String数组的输出 阅读全文
posted @ 2011-04-06 21:43 Bruce.陈 阅读(679) 评论(0) 推荐(0)
摘要: 觉得有必要了解下C#语言基础。要盖大房子,没地基确实不行。不是空中楼阁~Console.WriteLine("你好,我是bobi");可以说是最常用的输出语句,当然,里面主要是用来输出值的。可是是常量,也可以是变量,管他,就是输出值。Console.WriteLine() ;要输出多个值的时候,最好是用占位符的方法。不容易出错,而且清晰。。例:Console.WriteLine("{0}+{1}={2}",i1,i2,i3); //假设i1=1;i2=3。那么输出结果就是:1+2=3; 体会到了占位符的好处了吧。可以很清楚的替我们表达程序结构。类似的用法 阅读全文
posted @ 2011-04-06 21:17 Bruce.陈 阅读(201) 评论(0) 推荐(0)
摘要: 断点,查看值之间的传递过程。异常倒是好处理了现在,但是运行的的时候怎么都传不上值的确让人心烦~不管怎么样,每天都看到自己的再进步,或许就是一种充实~明天加油~从调程序开始吧,不管什么框架,过不过时,懂得学习方法别啥都重要~相信我没理解错误~ 阅读全文
posted @ 2011-03-23 23:42 Bruce.陈 阅读(182) 评论(1) 推荐(0)
摘要: protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { GridView1.EditIndex = -1; Bindgrid(); }//编辑按键下的取消代码。将EditIndex=-1,然后在绑定数据库。 protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { ... 阅读全文
posted @ 2011-03-23 17:30 Bruce.陈 阅读(6668) 评论(4) 推荐(0)