复习
路口下车
一个不错的小伙
展开
-
冒泡排序算法
class Program { static void Main(string[] args) { int[] sortArry ={ 0, 5, 6, 2, 1 }; for (int i = 0; i { for (转载 2013-10-12 17:11:40 · 457 阅读 · 0 评论 -
asp.net页面中实现如果图片不存在则显示默认图片
在ASP.net开发中如果想要实现图片找不到时显示默认图片的功能,我们有以下几种方法:1.js可以获得页面上每个image标签的对象。然后再设置它的src属性就ok了。代码 function window.onload() { var img = document.getElementById("form1").getElementsByTagName(转载 2013-12-29 22:03:10 · 1387 阅读 · 0 评论 -
C#中的Dictionary简介
简介在C#中,Dictionary提供快速的基于兼职的元素查找。当你有很多元素的时候可以使用它。它包含在System.Collections.Generic名空间中。在使用前,你必须声明它的键类型和值类型。详细说明必须包含名空间System.Collection.Generic Dictionary里面的每一个元素都是一个键值对(由二个元素组成:键和值) 键必须是唯转载 2013-12-14 22:47:40 · 400 阅读 · 0 评论 -
.net中防止SQL注入 方法
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Configuration;using System.Globalization;namespace Web{ public class SqlstrAny : IHttpModule翻译 2013-11-14 10:47:57 · 575 阅读 · 0 评论 -
ASP.NET控件缩写
类 型前 缀示 例AdrotatoradrtadrtTopAdBulletedListblstblstCityButtonbtnbtnSubmitCalendarcalcalMettingDatesCheckBoxchkch转载 2013-11-12 15:38:37 · 494 阅读 · 0 评论 -
js获取指定cookie的值
读取name为LoginInfo的cookie的值,完整的代码如下:var cookies = document.cookie; var start = cookies.indexOf("LoginInfo="); if(start == -1){ alert("The cookie not found"); } start = cookies.indexOf("="原创 2013-11-11 16:00:36 · 839 阅读 · 0 评论 -
为ckeditor添加行距的功能
发现CKeditor没有设置行距的功能,想想这么重要的功能肯定有相应的插件,于是百度一下,倒是有不少的教程,所以记录一下,以备后用,1.下载ckeditor的行距插件包 lineheight2.解压到ckeditor/plugins目录下3.修改ckeditor目录下的 config.js文件,在其中添加以下的代码config.extraPlugins += (转载 2013-10-22 13:17:02 · 683 阅读 · 0 评论 -
关于回车后关联哪个按钮的问题
因为一个页面里有一个ImageButton和一个Butonn控件,当回车时,默认是触发imagebutton控件要想触发BtnLogin登陆控件,得修改下 function sub() { if(event.keyCode == 13) { LoginForm.BtnLogin.focus(); LoginForm.BtnLogin.click();转载 2013-10-12 17:26:04 · 510 阅读 · 0 评论 -
在.net中使用sql存储过程
在Northwind数据库中定义的带参数的存储过程create proc GetCustomersOrders @CustomerId nchar(5)asselect OrderId,OrderDate,RequiredDate,ShippedDate from orders where CustomerID=@CustomerID order by orderidG转载 2013-10-12 17:22:53 · 455 阅读 · 0 评论 -
asp.net中cookie的用法
cookie中存储一个信息比如我们建立一个名为aspxcn,值为张三的cookie HttpCookie myCookie = new HttpCookie("aspxcn"); myCookie.Value = "张三"; //默认是关掉浏览器cookie就过期,这个可以设置过期时间 myCookie.Expire转载 2013-10-12 17:13:10 · 579 阅读 · 0 评论 -
sql数据库中触发器
--创建工资表,要求建立触发器,当插入数据是工资小于的--修改为,大于的修改为create table tbl_salary(empid int not null,empname varchar(20) not null,salary int)--创建触发器实现上述功能:create trigger tri_insert on tbl_salaryinstead of inse原创 2013-10-12 18:04:54 · 456 阅读 · 0 评论 -
Group by用法
Group by用途:对结果集进行分组,常与汇总函数一起使用。语法:SELECT column,SUM(column) FROM table GROUP BY column例:“Sales” 表中的原始数据 :Company AmountW3Schools 5500转载 2013-10-12 17:19:53 · 649 阅读 · 0 评论 -
多线程Thread例子
using System;using System.Collections.Generic;using System.Text;using System.Collections;using System.Threading; //引入命名空间namespace ConsoleApplication2{ class Program { s转载 2013-10-12 17:15:38 · 429 阅读 · 0 评论