• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

Angel----部落阁
Xcode10
博客园    首页    新随笔    联系   管理    订阅  订阅
2008年6月19日
用户控件(.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 angelfeather 阅读(2242) 评论(1) 推荐(0)
彩色验证码
摘要: 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 angelfeather 阅读(427) 评论(0) 推荐(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 angelfeather 阅读(442) 评论(0) 推荐(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 angelfeather 阅读(470) 评论(0) 推荐(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 angelfeather 阅读(1446) 评论(0) 推荐(0)
利用MD5加密数据库中的密码
摘要: .NET提供了进行数据加密类,下面就用例子进行说明如何使用MD5进行数据加密。 首先,创建一个UserAccount表,字段两个:UserName和Password,类型分别为varchar(25)和binary(16),下面的ASP.NET代码就是创建用户时的具体实现: <%@ Import Namespace="System.Security.Cryptography" %><... 阅读全文
posted @ 2008-06-19 14:42 angelfeather 阅读(839) 评论(0) 推荐(0)
扩展GridView控件(全)——增加10个常用功能
摘要: 作者:webabcd控件开发扩展GridView控件(一)——鼠标经过行时改变行的样式扩展GridView控件(二)——给字段标题加上排序状态扩展GridView控件(三)——单击命令按钮弹出确认框扩展GridView控件(四)——每行复选框的全选与取消全选扩展GridView控件(五)——固定表头、指定行或指定列扩展GridView控件(六)——数据行响应鼠标的单击和双击事件扩展GridView... 阅读全文
posted @ 2008-06-19 14:41 angelfeather 阅读(619) 评论(0) 推荐(0)
js下拉框(select)联动
摘要: 阅读全文
posted @ 2008-06-19 14:40 angelfeather 阅读(5661) 评论(2) 推荐(0)
SqlParameter的用法
摘要: 关于Sql注入的基本概念,相信不需多说,大家都清楚,经典的注入语句是' or 1=1--单引号而截断字符串,“or 1=1”的永真式的出现使得表的一些信息被暴露出来,如果sql语句是select * from 的话,可能你整个表的信息都会被读取到,更严重的是,如果恶意使用都使用drop命令,那么可能你的整个数据库得全线崩溃。 当然,现在重点不是讲sql注入的害处,而是说说如何最大限度的避免注入问... 阅读全文
posted @ 2008-06-19 14:37 angelfeather 阅读(57238) 评论(2) 推荐(6)
小记一篇~
摘要: <%@ 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 angelfeather 阅读(165) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3