急需一个.net控件(web) http://community.csdn.net/Expert/topic/3138/3138927.xml?temp=.8675959 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不大理解你的要求你是要一个HTML Web编辑器? to guxiangdefeng(故乡的风) : 那个网站不喜欢,普通用户根本没办法下载,控件又少to NoFile(无文件) 主要aspx输出图片,比如做一张签名图片,图片里可以显示用户IP等信息 你的目的是不是在已有的图片上添加文字?Image image=Image.FromFile("文件路径");Graphics g = Graphics.FromImage(image); g.DrawString("IP地址", new Font("黑体", 14, FontStyle.Bold ), SystemBrushes.WindowText, new Point(10,2));image.Save( HttpContext.Current.Response.OutputStream, ImageFormat.Jpeg);g.Dispose();image.Dispose();HttpContext.Current.Response.End(); to goody9807() : 现在还没收到,你确认你发了吗?[email protected]谢谢~~NoFile(无文件) : 命名空间是什么??using System.Drawing;System.Web.UI.WebControls.Image 没有FromFile,不晓得怎么写,请详细一点,谢谢啦~ // 在此处放置用户代码以初始化页面Bitmap newBitmap = new Bitmap(360,90,PixelFormat.Format32bppArgb);//根据上面创建的位图对象创建绘图面Graphics g = Graphics.FromImage(newBitmap);//以指定的颜色填充矩形区g.FillRectangle(new SolidBrush(Color.White), new Rectangle(0,0,360,90));//创建字体对象Font textFont = new Font("宋体",10);//创建RectangleF结构指定一个区域RectangleF rectangle = new RectangleF(0,0,360,90);//创建随机数对象Random rd = new Random();//取得随机数//int valationNo = 1000 + rd.Next(8999);//使用指定的颜色填充上面RectangleF结构指定的矩形区域//g.FillRectangle(new SolidBrush(Color.BurlyWood), rectangle);//在上面填充的矩形区域中填充上面生成的随机数g.DrawString("你的IP:" + Request.UserHostAddress.ToString() + "\n访问时间:" + DateTime.Now.ToString(), new Font("宋体",10), new SolidBrush(Color.Blue), new RectangleF(0,0,360,90));newBitmap.Save(HttpContext.Current.Response.OutputStream, ImageFormat.Jpeg);g.Dispose();newBitmap.Dispose();HttpContext.Current.Response.End(); .net2005 网页在浏览器中查看报错?? 如何将网站下所有的文件夹及文件动态绑定到TreeView控件里 ajax UpdatePanel控件的问题!·· 青岛的朋友请进,想找个老师~~~ 有关事务处理 vs2005里提供的WEB控件treeView怎么能做成展开时装载节点 用DataGrid如果做出yahoo音乐盒的样子,就是每行下面再有一行说明的东西?? 大家做ASP.net 有什么好的编辑网页工具啊,我用的感觉都不好 简单问题 为什么报如下错 程序员怎样追女孩? .NET如何取得上一个HTM网页传来的数据 专业网站的几个问题!
你是要一个HTML Web编辑器?
Graphics g = Graphics.FromImage(image);
g.DrawString("IP地址", new Font("黑体", 14, FontStyle.Bold ), SystemBrushes.WindowText, new Point(10,2));
image.Save( HttpContext.Current.Response.OutputStream, ImageFormat.Jpeg);
g.Dispose();
image.Dispose();
HttpContext.Current.Response.End();
现在还没收到,你确认你发了吗?[email protected]谢谢~~NoFile(无文件) :
命名空间是什么??using System.Drawing;
System.Web.UI.WebControls.Image 没有FromFile,不晓得怎么写,请详细一点,谢谢啦~
Bitmap newBitmap = new Bitmap(360,90,PixelFormat.Format32bppArgb);//根据上面创建的位图对象创建绘图面
Graphics g = Graphics.FromImage(newBitmap);
//以指定的颜色填充矩形区
g.FillRectangle(new SolidBrush(Color.White), new Rectangle(0,0,360,90));//创建字体对象
Font textFont = new Font("宋体",10);
//创建RectangleF结构指定一个区域
RectangleF rectangle = new RectangleF(0,0,360,90);
//创建随机数对象
Random rd = new Random();
//取得随机数
//int valationNo = 1000 + rd.Next(8999);
//使用指定的颜色填充上面RectangleF结构指定的矩形区域
//g.FillRectangle(new SolidBrush(Color.BurlyWood), rectangle);
//在上面填充的矩形区域中填充上面生成的随机数
g.DrawString("你的IP:" + Request.UserHostAddress.ToString() + "\n访问时间:" + DateTime.Now.ToString(), new Font("宋体",10), new SolidBrush(Color.Blue), new RectangleF(0,0,360,90));
newBitmap.Save(HttpContext.Current.Response.OutputStream, ImageFormat.Jpeg);g.Dispose();
newBitmap.Dispose();
HttpContext.Current.Response.End();