07 2009 档案

摘要:这样做的目的一个是为了减少文件的量,相比较放在数据库里要比放文件夹里要少一些,第二个可以减少对图片文件的暴漏。不知道能不能有效防止“**门”事件的发生。示例代码如下:using System;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Collec... 阅读全文
posted @ 2009-07-22 14:10 iZiYue 阅读(342) 评论(0) 推荐(0)
摘要:'用户 'sa' 登录失败。该用户与可信 SQL Server 连接无关联问题一、忘记了登录Microsoft SQL Server 2005 的sa的登录密码解决方法:先用windows身份验证的方式登录进去,然后在‘安全性’-‘登录’-右键单击‘sa’-‘属性’,修改密码点击确定就可以了。问题二、已... 阅读全文
posted @ 2009-07-21 21:53 iZiYue 阅读(1721) 评论(0) 推荐(0)
摘要:protected void Button1_Click(object sender, EventArgs e) { Export("application/ms-excel", "Nor.xls"); } private void Export(string FileType,string FileName) { Response.Charset = "GB2312"; Response.Con... 阅读全文
posted @ 2009-07-20 17:03 iZiYue 阅读(176) 评论(0) 推荐(0)
摘要:在GridView控件中增加DataBound事件,for (int i = 0; i <= GridView1.Rows.Count - 1; i++) { DataRowView mydrv = myds.Tables["AllUsers"].DefaultView[i]; int iDate = Convert.ToInt32(mydrv["UserId"]); if (Convert... 阅读全文
posted @ 2009-07-20 13:59 iZiYue 阅读(557) 评论(0) 推荐(0)
摘要:用css即可为GridView控件增加滚动条,style="overflow-y:scroll;width:***px;height:***px;“ 阅读全文
posted @ 2009-07-20 10:10 iZiYue 阅读(527) 评论(0) 推荐(0)
摘要:在Page_Load事件中给GridView控件增加属性,添加CSS样式来达到让GridView换行的目的。//正常换行 GridView1.Attributes.Add("style", "world-break:keep-all;word-wrap:normal"); //下面是自动换行 GridView1.Attributes.Add("style", "word-break:break-a... 阅读全文
posted @ 2009-07-20 08:35 iZiYue 阅读(403) 评论(0) 推荐(0)
摘要:<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" AllowSorting="True" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRo... 阅读全文
posted @ 2009-07-18 15:52 iZiYue 阅读(284) 评论(0) 推荐(0)
摘要:在GridView中显示的数据可能不是按照某种排列书序的,例如ID列,假如我们让它按照升序来进行排序,参照CSDN上清清月儿的写法,在RowDataBound中增加代码如下:if (e.Row.RowIndex != -1) { int id = e.Row.RowIndex + 1; e.Row.Cells[0].Text = id.ToString(); } 阅读全文
posted @ 2009-07-18 15:11 iZiYue 阅读(298) 评论(0) 推荐(0)
摘要:只需要在RowDataBound中增加以下代码就可以简单实现 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { //判断当前行是否是数据行 if (e.Row.RowType == DataControlRowType.DataRow) { //正常状态和交互状态 if (e.Row.Row... 阅读全文
posted @ 2009-07-18 14:17 iZiYue 阅读(249) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2009-07-18 09:37 iZiYue 阅读(307) 评论(0) 推荐(0)
摘要:在GridView的事件中增加RowDataBound,在这个事件中首先判断当前行是不是数据行,然后进行变色处理,代码如下所示:if (e.Row.RowType == DataControlRowType.DataRow) { //鼠标经过时,行背景色变 e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#CC00... 阅读全文
posted @ 2009-07-18 09:06 iZiYue 阅读(276) 评论(0) 推荐(0)
摘要:一个简单的例子说明GridView与DropDownList结合的用法。<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" AllowSorting="True" PageSize="6">... 阅读全文
posted @ 2009-07-17 14:47 iZiYue 阅读(6565) 评论(0) 推荐(0)
摘要:点击列头,可以将列字段按照升降序进行排序。<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" AllowSorting="True" OnSorting="GridView1_Sorting"&g... 阅读全文
posted @ 2009-07-17 11:14 iZiYue 阅读(446) 评论(0) 推荐(0)
摘要:在开发中用到GridView控件,需要种种操作,在网上看到了很多高手的写法,我在这里也借鉴了CSDN上清清月儿的写法,先写编辑,更新和取消操作的方法。 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="No... 阅读全文
posted @ 2009-07-17 10:05 iZiYue 阅读(437) 评论(0) 推荐(0)
摘要:连接数据库需要配置Web.config的Sql server,WebDAL节点是需要生成抽象工厂的实例,本登陆用到了3层结构+反射抽象工厂,才疏学浅,请大家多多指教。BLL类:using System;using System.Collections.Generic;using System.Text;using Logindemo.IDAL;using Logindemo.Model;using... 阅读全文
posted @ 2009-07-16 14:46 iZiYue 阅读(671) 评论(0) 推荐(0)
摘要:[代码] 阅读全文
posted @ 2009-07-12 23:36 iZiYue 阅读(198) 评论(1) 推荐(0)
摘要:[代码][代码] 阅读全文
posted @ 2009-07-12 23:08 iZiYue 阅读(294) 评论(0) 推荐(0)
摘要:[代码][代码] 阅读全文
posted @ 2009-07-12 16:45 iZiYue 阅读(231) 评论(0) 推荐(0)
摘要:[代码] 阅读全文
posted @ 2009-07-12 16:40 iZiYue 阅读(203) 评论(0) 推荐(0)
摘要:[代码][代码] 阅读全文
posted @ 2009-07-12 16:37 iZiYue 阅读(234) 评论(0) 推荐(0)
摘要:[代码][代码][代码] 阅读全文
posted @ 2009-07-12 16:27 iZiYue 阅读(553) 评论(0) 推荐(0)
摘要:[代码][代码] [代码]CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1//JScript文件2varxmlHttp;34//检测用户是否存在5functionCheckName(userName)6{7createXMLHTTP();8v... 阅读全文
posted @ 2009-07-09 09:24 iZiYue 阅读(307) 评论(2) 推荐(0)

ChinaHDTV.ORG