我发一个吧。太长不好贴。mail?
解决方案 »
- gridview 排版问题,在线等待
- 在一个td中如何控制行的高度
- 新建 多个 删除 按钮列,每个操作目的不同,如果在 事件里区分哪个是哪个?
- url映射问题
- 图片在磁盘中,路径在库里,怎样能知道图片的大上(c#)
- asp.net cookie问题,很急,请帮我解决
- 怎么web form中没有treeview控件?
- 怎么在page_load中让页面一出来时下拉列表控件的值为我指定的值?
- 怎样将一个InputFile组件的内容复制给另一个InputFile组件阿?
- 求一个财务收益率的算法,FIRR算法
- ASP.NET的问题.
- ASP.NET有一个HttpPostedFile组件用来上传文件的,谁会使用它,能给我VB的源代码吗?
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Imaging" %>
<%@ Import Namespace="System.Drawing.Drawing2D" %>
<%
Response.Clear();
int height = 100;
int width = 200;
Random r = new Random();
int x = r.Next(75);
int x1 = 0;
int a = r.Next(155);
int x2 = r.Next(100); Bitmap bmp = new Bitmap(width, height, PixelFormat.Format24bppRgb);
Graphics g = Graphics.FromImage(bmp);
g.SmoothingMode = SmoothingMode.AntiAlias;
g.Clear(Color.LightGray);
g.DrawRectangle(Pens.White, 1, 1, width-3, height-3);
g.DrawRectangle(Pens.Gray, 2, 2, width-3, height-3);
g.DrawRectangle(Pens.Black, 0, 0, width, height);
g.DrawString("Response.OutputStream Test",
new Font("Arial", 10, FontStyle.Bold),
SystemBrushes.WindowText, new PointF(10,50));
g.FillRectangle(new SolidBrush(Color.FromArgb(a, 255, 128, 255)),
x, 20, 100, 50);
g.FillRectangle(new LinearGradientBrush(new Point(x2, 0),
new Point(x2+75, 50+30),
Color.FromArgb(128, 0, 0, 128),
Color.FromArgb(255, 255, 255, 240)),
x2 ,50, 75, 30); bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
g.Dispose();
bmp.Dispose();
Response.End();
%>
c#也一样!