2011年12月27日

asp.net上传下载

摘要: HttpCookie getcookie = Request.Cookies["newcookie"]; string terminal = getcookie.Values["id"]; //文件上传 2011-12-24 Boolean fileOK = false; DateTime now = DateTime.Now; string UserDirectory = now.Year.ToString() + "-" + now.Month.ToString() + "-" +... 阅读全文

posted @ 2011-12-27 16:40 daywrite 阅读(197) 评论(0) 推荐(0)

添加-密码-加密

摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Add.aspx.cs" Inherits="Add" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns=" 阅读全文

posted @ 2011-12-27 16:35 daywrite 阅读(139) 评论(0) 推荐(1)

Gridview实现分页

摘要: 你看看,我这是乱添加的在数据库里面,这么长,想办法分页。这是分页的存储过程:set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgocreate PROCEDURE [dbo].[udt_page] @sql varchar(8000) = '', --进行查询的SQL语句 @page int,--页码 @pagesize int,--每页显示的条数 @pageCount int = 0 output,--总页数 @recordCount int = 0 output --记录总数as/*内容说明:翻页存储过程*/set ... 阅读全文

posted @ 2011-12-27 13:57 daywrite 阅读(134) 评论(0) 推荐(0)

简单—三层-存储过程-增删改<五>

摘要: 第五,这次来探讨下关于三层,其实呢,我也在实践过程中!首先在解决方案下,添加一个类库。然后添加一个user类文件。using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace lwb.model{ public class user { public user() { } #region model private int _id; private string _txtuser; ... 阅读全文

posted @ 2011-12-27 12:36 daywrite 阅读(149) 评论(0) 推荐(0)

简单-三层-存储过程-增删改<四>

摘要: 第四,首次谈到运用存储过程进行修改和删除。首先,你要写一个存储过程create Procedure [dbo].[Updatelogin_User]( @txtuser nvarchar(10), @txtpassword nvarchar(20) )ASUPDATE login_userSET txtpassword= @txtpassword WHERE txtuser = @txtuser前台调用:using System;using System.Collections.Generic;using System.Linq;using System... 阅读全文

posted @ 2011-12-27 11:48 daywrite 阅读(230) 评论(0) 推荐(0)

简单-三层-存储过程-增删改<三>

摘要: 第三,在实际过程当中,有些客户或者自己,需要在修改的时候,弹出一个新窗口,修改或者删除之后,刷新Gridview,下面就来实现这个。这里要写在GridView1_RowCommand事件里面。protected void gvList_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "edit") { string UserName = e.CommandArgument.ToString(); //Respon... 阅读全文

posted @ 2011-12-27 11:14 daywrite 阅读(161) 评论(0) 推荐(0)

导航