YPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w***3.org/TR/REC-html40/loose.dtd">
以前,在页面上实现缩略图必须借助第三方组件。现在,有了.NET,就可以很轻松地实现缩略图。下面就是实现缩略图的例子。
ToThumbnailImage.aspx
Inherits="Exam_C.ToThumbnailImage" %>
Lion互动网络 =>生成缩略图
ToThumbnailImage.aspx.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Drawing.Imaging;
namespace Exam_C
{
///
/// ToThumbnailImage 的摘要说明。
/// public class ToThumbnailImage : System.Web.UI.Page
{
/*
Create By lion
2003-05-20 19:00
Copyright (C) 2004 www.LionSky.Net. All rights reserved.
Web: http://www.Lions***ky.net ;
Email:
[email protected] */
static Hashtable htmimes=new Hashtable();
internal readonly string AllowExt = ".jpe|.jpeg|.jpg|.png|.tif|.tiff|.bmp";