namespace ServerFlat.UserCtrl
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
/// <summary>
/// Newfocus 的摘要说明。
/// </summary>
public class Newfocus : System.Web.UI.UserControl
{
protected System.Data.SqlClient.SqlConnection sqlCon;
protected System.Data.SqlClient.SqlCommand sqlCommand1;
protected System.Web.UI.WebControls.Image ImageSource;
protected System.Web.UI.WebControls.HyperLink HyperLink1;
protected System.Web.UI.WebControls.HyperLink HyperLink2;
protected System.Web.UI.WebControls.HyperLink HyperLink3;
//定义变量
public int Id2;
public int Id1;
public int Id3;
protected string imagename;
//protected string mpath;
//定义image类的对象, GDI画图类
System.Drawing.Image Image ,NewImage;
protected System.Web.UI.WebControls.ImageButton ImgBtt1;
protected System.Web.UI.WebControls.ImageButton ImgBtt2;
protected System.Web.UI.WebControls.ImageButton ImgBtt3;
//protected System.Web.UI.WebControls.Label Label1;
//提供一个回调方法,用于确定Image对象在执行生成缩略图操作时何时提前取消执行
//如果此方法确定 GetThumbnailImage 方法应提前停止执行,则返回 true;否则返回 false
System.Drawing.Image.GetThumbna

这个博客展示了如何在ASP.NET中生成缩略图。通过读取数据库中的图片,利用System.Drawing.Image类创建缩略图,并将其保存到服务器上的特定路径。缩略图在用户界面上作为链接展示,点击后跳转到详细信息页面。
最低0.47元/天 解锁文章
1577

被折叠的 条评论
为什么被折叠?



