Image Guard Extension for BlogEngine.NET

Image Guard is the first (if not unique, at least for the moment) BlogEngine.NET extension that allows you guard your image files in blog posts in three different ways when they are displayed on other sites.

Watermark: Add watermark to your images. (That’s a good way to spread your web site, isn’t it ? : ) );

Block: Replace the image that other sites request with a block image, such as an image only shows Not Allowed text on it;

Reject: Responde the request with 403 code. [More]

给图片添加水印的C#类库

本文提供了一个给图片添加水印的C#类库,首先介绍了它的使用方法,其次介绍了该类库的结构,最后公开了它的源代码以及整个项目文件。 [More]

使用360 C盘搬家后,Visual Studio 添加新项中我的模板丢失问题的解决办法

我使用360 C盘搬家后,在用 Visual Studio 添加新项时,突然发现自己以前的创建的模板消失了! 上网没找到解决办法,后来自己分析了一下,成功解决。 步骤如下: 1. 打开我的文档,依次进入“Visual Studio 2008\Templates\ItemTemplates”文件夹,在这个文件夹里可以看到自己制作的模板压缩包(.zip文件),将它们复制; 2. 再进入“... [More]

设置GridView列的数据格式为百分比

GridView列的数据格式,可以在列的DataFormatString属性中进行设置。我上网查询了一下相关的资料,全部都是讲如何设置为日期格式、货币格式、小数格式,而我想设置成百分比的格式,却怎么也找不到相关资料,只能自己尝试,没想到轻松搞定。即将 DataFormatString 设置为 {0: 0.#%} 即可。如下图: 如果要略掉首位的0,还可以设置为{0: #.#%}。小数后面的#... [More]

给GridView添加序号列

在使用GridView显示数据时,在最左边显示一个序号列,可以增加可读性。基本上可以给所有的GridView都添加一个这样的序号列。 如图: 添加方法一: 1. 在<Columns></Columns>中添加一个模板列,代码如下: <asp:TemplateField HeaderText="序号&quo... [More]