![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ASP.Net编程
文章平均质量分 78
TQY2008
这个作者很懒,什么都没留下…
展开
-
封装ASP.NET操作ACCESS数据库常用操作的类
using System;using System.Data;using System.Data.OleDb;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.We转载 2008-08-20 17:08:00 · 423 阅读 · 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转载 2008-09-04 08:56:00 · 411 阅读 · 0 评论 -
datagrid页序号
datagrid页序号:原创 2008-09-04 09:10:00 · 420 阅读 · 0 评论 -
ASP.NET1.1数据绑定与ASP.NET2.0数据绑定的方法对比
asp.net 1.1的数据绑定的标签: ASP.NET 2.0 提供以及下列内容(同时兼容ASP.NET 1.1中的数据绑定标签):转载 2008-09-15 14:29:00 · 452 阅读 · 0 评论 -
ASP.NET杜绝文件上传漏洞的代码
检测文件的头部编码,不同类型文件的头部编码是不一样的(不知道这样说恰当不,有错误希望大家指出),比如255216是jpg;7173是gif;6677是BMP,13780是PNG;7790是exe,8297是rarhttp://www.w3.org/1999/xhtml" >无标题页可以实现真正意义上的文件类型判断,推荐使用这种方法.using System;using System.Data;us转载 2008-09-17 13:16:00 · 2011 阅读 · 0 评论 -
asp.net去掉HTML标记
using System;using System.Web;using System.Text.RegularExpressions; public static string NoHTML(string Htmlstring) { //删除脚本 Htmlstring = Regex.Replace(Htmlstring,@"]*?>.*?","",Re原创 2008-09-26 15:51:00 · 668 阅读 · 0 评论 -
在ASP.NET中用三个DropDownList控件方便的选择年月日
private void Page_Load(object sender, System.EventArgs e){DateTime tnow=DateTime.Now;//现在时间ArrayList AlYear=new ArrayList();int i;for(i=2002;iAlYear.Add(i);ArrayList AlMonth=new ArrayList();for(i=1;iA原创 2008-10-07 15:38:00 · 1652 阅读 · 0 评论 -
asp.net生成缩略图的类
public Image ResourceImage; private int ImageWidth; private int ImageHeight; public string ErrMessage; /// /// 类的构造函数 /// /// 图片文件的全路径名称 public ImageClass(string ImageFileName) { R转载 2008-10-08 09:18:00 · 484 阅读 · 0 评论 -
ASP.NET生成高质量缩略图通用函数(c#代码)
/// /// 生成缩略图 /// /// 源图路径(物理路径) /// 缩略图路径(物理路径) /// 缩略图宽度 /// 缩略图高度 /// 生成缩略图的方式 public static void MakeThumbnail(string originalImagePath转载 2008-10-08 09:58:00 · 468 阅读 · 0 评论 -
asp.Net通用防注入程序(整站通用)
出处:淘特网注:转载请注明出处防止sql注入,通常一个一个文件修改不仅麻烦而且还有漏掉的危险,下面我说一上如何从整个系统防止注入。做到以下三步,相信的程序将会比较安全了,而且对整个网站的维护也将会变的简单。一、数据验证类:parameterCheck.cspublic class parameterCheck{ public static bool isEmail(string emai转载 2008-08-28 14:32:00 · 652 阅读 · 0 评论 -
FCKeditor ASP版 在线编辑器终极使用指南
本文使用的是最新的FCKeditor 2.3.1版本官方网站下载: http://www.fckeditor.net/download[建议直接在官方网站下载最新版本]下面就开始用了:第一项工作就是对这个功能宏大的编辑器进行精简,当然是文件精简而非功能精简化。在这里我以asp版的FCKeditor为例进行,进入到FCKeditor 文件夹下,先把以“_”为开头的文件夹统统删除,这些文件夹里放的是转载 2008-08-28 14:30:00 · 771 阅读 · 0 评论 -
DropDownList包含树型菜单
private void Page_Load(object sender, System.EventArgs e) { // 在此处放置用户代码以初始化页面 if(!Page.IsPostBac转载 2008-08-28 14:29:00 · 630 阅读 · 0 评论 -
常用的辅助代码
点击返回上页代码:弹出警告框代码:function AlertButton(){window.alert("要多多光临呀!");}// -->点击打开新窗口function NewWindow(){window.open("http://www.mcmx.com","","height=240,width=340,status=no,location=no,toolbar=no,dire原创 2008-08-20 17:51:00 · 2286 阅读 · 0 评论 -
下拉列表绑定及修改
一、DropDownList:1、选项值保存到数据库: Hashtable ht=new Hashtable();//这里用Hashtable ht.Add("字段名",DropDownListID.SelectedItem.Text.ToString());//保存选项Text ht.Add("字段名",DropDownListID.SelectedItem.Value.ToStr原创 2008-08-20 17:51:00 · 686 阅读 · 0 评论 -
ASP和C#隐藏文件下载路径的方法
关于下载路径的隐藏都是通过传递一个数据库中的ID,然后在另外一张页面通过传递的ID在数据库中读出路径。 1、c#中实现的方法(只需要.ASPX.CS的代码就可以了)string sel_sql="select FileVisualPath from TabMailAttachFiles where FileID="+Request.QueryString["destFileName转载 2008-08-20 17:20:00 · 285 阅读 · 0 评论 -
利用Jmail.Message发送邮件
该段代码涉及到JMail v4.3的大部分常用方法。包括邮件基本信息、身份验证、附件等。无需很多的修改就可以使用,也可以改成函数或过程。Dim JMail, contentIdSet JMail = Server.CreateObject("JMail.Message") JMail.Charset = "gb2312" 邮件字符集,默认为"US-ASCII" JMail.ISOEncod转载 2008-08-27 11:15:00 · 574 阅读 · 0 评论 -
必须知道的C#的25个基础概念(附演示)
先自己复习一下,看看下面的C#问题都能回答上来么?1.静态变量和非静态变量的区别?2.const 和 static readonly 区别?3.extern 是什么意思?4.abstract 是什么意思?5.internal 修饰符起什么作用?6.sealed 修饰符是干什么的?7.override 和 overload 的区别?8.什么是索引指示器?9.new 修饰符是起什么作用?10.this转载 2008-08-26 17:36:00 · 528 阅读 · 0 评论 -
Ajax无刷新实现图片切换特效
一、AjaxMethodusing System;using System.Data;using System.Data.SqlClient;namespace AjaxImage{ /**//// /// AjaxMethod 的摘要说明。 /// public class AjaxMethod { public AjaxMethod()转载 2008-08-28 14:18:00 · 524 阅读 · 0 评论 -
asp.net分页例子
datagrid.aspx 程序代码void Page_Load(){ string strConnection="Provider=Microsoft.Jet.OleDb.4.0;Data Source=";strConnection+=Server.MapPath("gs.mdb");OleDbConnection objConnection=new OleDbConnectio转载 2008-08-28 14:22:00 · 2506 阅读 · 1 评论 -
Asp.net三层结构入门示例源码>>SQLserver/SQLHelper.cs
using System; 2using System.Configuration; 3using System.Data; 4using System.Data.SqlClient; 5using System.Collections; 6 7namespace Logindemo.SQLserver 8...{ 9/**//// download from www.51asp转载 2008-08-28 14:26:00 · 1596 阅读 · 1 评论 -
一个完整的DataGrid分页及全选删除实例
前台HTML代码: http://schemas.microsoft.com/intellisense/ie5"> function CheckAll(form) { for (var i=0;i { var e = form.elements[i]; e.checked = form.chkall.checked;原创 2008-10-08 16:59:00 · 882 阅读 · 0 评论