布丁毛毛----部落阁
VS2008.NET
随笔- 65  文章- 17  评论- 146 
博客园  首页  新随笔  联系  管理  订阅 订阅
06 2008 档案
用户控件(.ascx)与网页间(.aspx)如何传值的几种方法

摘要: 1.aspx文件:public void SetLabel(string str) { this.Label1.Text = str; ; } ascx文件;protected void Button1_Click(object sender, EventArgs e) { System.Web.UI.Page p = this.Page; Type pageType = p.GetType();...阅读全文
posted @ 2008-06-19 14:55 天使毛毛. 阅读(1244) | 评论 (1) 编辑
彩色验证码

摘要: private void CreateImage(string checkCode) { int iwidth = (int)(checkCode.Length * 15); System.Drawing.Bitmap image = new System.Drawing.Bitmap(iwidth, 25); Graphics g = Graphics.FromImage(image); g.C...阅读全文
posted @ 2008-06-19 14:47 天使毛毛. 阅读(238) | 评论 (0) 编辑
一段常用的Page_Load事件 (如果有更好的希望大家留言)

摘要: protected void Page_Load(object sender, EventArgs e) {  SqlConnection myConnection = new SqlConnection("server=Localhost;database=pubs;uid=sa;pwd=;");//创建SQL连接  SqlCommand myCommand = new SqlCommand("...阅读全文
posted @ 2008-06-19 14:46 天使毛毛. 阅读(230) | 评论 (0) 编辑
c#.net常用函数和方法集

摘要: 1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4 取当前日 int 日=curre...阅读全文
posted @ 2008-06-19 14:44 天使毛毛. 阅读(184) | 评论 (0) 编辑
ASP.NET中$#=的用法

摘要: <%$ %>获取App_GlobalResources中message.resx文件中的B0011对应的字符串 <asp:Button ID="btnExecute" runat="server" CssClass="pressedbutton" Font-Bold="True" Text="<%$ Resources:Message, B0011 %>" />...阅读全文
posted @ 2008-06-19 14:43 天使毛毛. 阅读(391) | 评论 (0) 编辑
利用MD5加密数据库中的密码

摘要: .NET提供了进行数据加密类,下面就用例子进行说明如何使用MD5进行数据加密。 首先,创建一个UserAccount表,字段两个:UserName和Password,类型分别为varchar(25)和binary(16),下面的ASP.NET代码就是创建用户时的具体实现: <%@ Import Namespace="System.Security.Cryptography" %><...阅读全文
posted @ 2008-06-19 14:42 天使毛毛. 阅读(297) | 评论 (0) 编辑
小记一篇~

摘要: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mao.ascx.cs" Inherits="mao" %><asp:Repeater ID="rpt_mao" runat="server"><ItemTemplate><a href='<%# Eval("link") %&g...阅读全文
posted @ 2008-06-19 14:07 天使毛毛. 阅读(43) | 评论 (0) 编辑
推荐一个.net代码查看器Reflector

posted @ 2008-06-18 16:57 天使毛毛. 阅读(120) | 评论 (0) 编辑
GridView导出Excel

posted @ 2008-06-18 16:48 天使毛毛. 阅读(132) | 评论 (0) 编辑
GridView格式化导出Excel

posted @ 2008-06-18 16:48 天使毛毛. 阅读(145) | 评论 (0) 编辑
GridView统计数据和修改Cell

posted @ 2008-06-18 16:48 天使毛毛. 阅读(254) | 评论 (0) 编辑
简单的ArrayList遍历

posted @ 2008-06-18 16:48 天使毛毛. 阅读(1825) | 评论 (0) 编辑
推荐一个学习asp.net的好地方

posted @ 2008-06-18 16:48 天使毛毛. 阅读(68) | 评论 (0) 编辑
遍历页面的所有button控件

posted @ 2008-06-18 16:48 天使毛毛. 阅读(113) | 评论 (0) 编辑
asp.net简单的md5算法

posted @ 2008-06-18 16:48 天使毛毛. 阅读(116) | 评论 (0) 编辑
Microsoft .Net 框架 SDK 快速入门教程

posted @ 2008-06-18 16:48 天使毛毛. 阅读(103) | 评论 (0) 编辑
.net之旅-用户登录框架[还不错,转自CSDN]

posted @ 2008-06-18 16:25 天使毛毛. 阅读(351) | 评论 (4) 编辑

Copyright ©2012 天使毛毛.