摘要: 寫stored procedure時候,如果有參數的type是nvarchar(max)在.Net端設定size時候要設為-1舉例:如果有個參數@Message資料型態是nvarchar(max),在程式端撰寫時需寫成:new SqlParameter("@Message",SqlDbType.NVarChar,-1)參考資料:http://weblogs.asp.net/jeffwids/archive/2008/08/15/nvarchar-max-parameters-need-the-size-set-to-1.aspx 阅读全文
posted @ 2013-04-30 18:08 零点HY 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 在一个网页中如果含有验证控件,在设定Button,LinkButton等具有提交表单功能的服务端验证空间时,要注意该控件的CausesValidation属性。该属性有两个值True和False,当为True时表示在提交表单时,page中的IsValid必须为True(页面中的验证控件全部通过验证),如果设置为False以后,页面在提交之前就不需要去触发验证控件的校验。 阅读全文
posted @ 2013-04-29 17:52 零点HY 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 在DataList中加了LinkButton来删除当前记录,却发现怎么也不起作用。设置断点跟踪,发现ItemCommand事件根本无法响应。原因可能如下:● 没有把DataList的ItemCommand事件和DataList_ItemCommand事件处理程序关联起来了。● 将DataList的绑定写在了 IspostBack{} 外面 ,因此造成了回发时重新绑定、加载数据。● Page和控件的EnableViewState设为false,禁用了状态,导致每次PostBack时控件都会重新绑定。参考:ItemCommand事件不响应http://blog.csdn.net/bn007/arc 阅读全文
posted @ 2013-04-29 15:49 零点HY 阅读(153) 评论(0) 推荐(0) 编辑
摘要: <head runat="server"> <title></title> <script type="text/javascript"> function selectAll() {//全选 var divlist = document.getElementById('divlist'); var inputs = divlist.getElementsByTagName('input'); for (var i = 0; i < inputs.length; i++ 阅读全文
posted @ 2013-04-29 01:03 零点HY 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Dom_常用方法,属性和事件——Window对象:alert()方法:弹出一个对话框。confirm()方法:类似于alert()方法,但它弹出的对话框有确定和取消按钮,点击确定按钮返回true,点击取消按钮返回false。navigate()方法:重新导航到指定的网址。varinterval=setInterval("alert('啦啦啦'),500")方法:表示每隔500毫秒就弹出一次对话框。clearInterval(interval)方法:表示清除计时器。setTimeout("alert('啦啦啦'),5000" 阅读全文
posted @ 2013-04-29 01:01 零点HY 阅读(239) 评论(0) 推荐(0) 编辑
摘要: WinForm学习笔记加法计算器:界面:代码:1usingSystem;2usingSystem.Collections.Generic;3usingSystem.ComponentModel;4usingSystem.Data;5usingSystem.Drawing;6usingSystem.Linq;7usingSystem.Text;8usingSystem.Windows.Forms;910namespace加法计算器11{12publicpartialclassForm1:Form13{14publicForm1()15{16InitializeComponent();17}181 阅读全文
posted @ 2013-04-29 00:58 零点HY 阅读(195) 评论(0) 推荐(0) 编辑
摘要: JavaScript学习笔记页面嵌入:HTML页面代码如下:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><title></title><scripttype="text/javascr 阅读全文
posted @ 2013-04-29 00:57 零点HY 阅读(139) 评论(0) 推荐(0) 编辑
摘要: ADO.NET基础一、在visualstudio中调用数据库有两种方式:1、先在SQLServerManagementStudio中建好数据库,然后将建好的数据库附加到visualstudio中。使用这种方式不用加入额外的代码,就可以直接使用字符串连接函数。2、直接在visualstudio中创建数据库(使用内嵌mdf文件的形式)。使用这种方式需要加入额外的代码(将代码添加到Main()函数中),代码如下:ViewCode1stringdataDir=AppDomain.CurrentDomain.BaseDif(dataDir.EndsWith(@"\bin\Debug\" 阅读全文
posted @ 2013-04-29 00:51 零点HY 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 第一种方式:数据库连接代码:view sourcepr01using System;02using System.Data;03using System.Configuration;04using System.Web;05using System.Web.Security;06using System.Web.UI;07using System.Web.UI.WebControls;08using System.Web.UI.WebControls.WebParts;09using System.Web.UI.HtmlControls;10using System.Data.SqlClien 阅读全文
posted @ 2013-04-29 00:46 零点HY 阅读(147) 评论(1) 推荐(0) 编辑