Quantcast
Channel: 终吾一生--SonTin'Blog - ASP.net
Browsing all 10 articles
Browse latest View live

ASP.NET中存取图片到数据库的示例(C#)

ASP.NET中存取图片到数据库的示例(C#)//开发环境:Window 2003、SQLServer2000、.Net 2.0//开发语言:C#、ASP.Net//简介:图片预览,数据库中图片存储及读取//作者:wayne-ivan//Email:wayne-ivan@163.com /*首先在SQL Server中建立一个图片存储的数库表,ImageData...

View Article


Image may be NSFW.
Clik here to view.

C# 读取excel数据的两个方法

oledb方法 程序代码using System.Data.OleDb;            string strCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\\test.xls; Extended Properties=Excel 8.0";            OleDbConnection myConn = new...

View Article


C#中哈希表(Hashtable)的用法

C#中HashTable的用法 一,哈希表(Hashtable)简述  在.NET...

View Article

asp.net自定义错误处理页面的几种方法。

ASP.NET 提供三种用于在出现错误时捕获和响应错误的主要方法:Page_Error 事件、Application_Error 事件以及应用程序配置文件 (Web.config)。如果您不调用 Server.ClearError 或者捕获 Page_Error 或 Application_Error 事件中的错误,则将根据 Web.config 文件的 <customErrors>...

View Article

Image may be NSFW.
Clik here to view.

解决:通过asp.net 调用FlashPrinter.exe把所有可打印的文件转换成swf文件

FlashPaper干嘛用的?加个连接:http://apps.hi.baidu.com/share/detail/14456532FlashPaper是一个虚拟打印机,可将word文件转化成swf格式文件(.doc .xls .txt...

View Article


Image may be NSFW.
Clik here to view.

asp.net 为指定的图片生成缩图

程序代码#region 为指定的图片生成缩图        /// <summary>        /// 为指定的图片生成缩图        /// <para>color != null,则不变形</para>        /// </summary>        /// <param...

View Article

Image may be NSFW.
Clik here to view.

C#获取汉字的首字母函数,包括特殊字

获取汉字的首字母函数,得到单个字符的首字母 程序代码#region ==获取汉字的首字母函数==                        //返回给定字符串的首字母        public static String IndexCode(String IndexTxt)        {        String _Temp=null;        for(int...

View Article

Image may be NSFW.
Clik here to view.

C#发邮件类-带附件功能

C#发邮件类-带附件功能 程序代码//======================================================================////        系统名称: 站内短信系统//        命名空间名称: ST.SiteMessages//        文件名: sm_Email.cs//        创建者: 章...

View Article


aspx木马安全设置与防御,禁止aspx木马读取进程、iis信息、跨站、执行cmd命令

问题:网站被挂aspx木马后,可以读取进程、iis信息、跨站、执行cmd命令等操作解决方案:设置权限禁止aspx读取1、对于每个网站建立一个用户、并将用户放入guest组,给站点写入、读取的权限。并在iis上允许匿名访问。2、<system.web><identity impersonate="true"...

View Article


Image may be NSFW.
Clik here to view.

aspx.net文件经典操作类*

aspx.net文件经典操作类 程序代码using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using...

View Article
Browsing all 10 articles
Browse latest View live