大家帮我看看为什么不对
这是我刚写的一个验证码程序,不知为什么,最后一行代码最是报错,希望大哥大姐们能帮帮小弟我.谢谢谢了.
private void Page_Load(object sender, System.EventArgs e)
{
Bitmap newBitmap = new Bitmap(36,16,PixelFormat.Format32bppArgb);
System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(newBitmap);
g.FillRectangle(new SolidBrush(Color.White),new Rectangle(0,0,36,16));
System.Drawing.Font textFont = new Font("Times new Roman",10);
System.Drawing.RectangleF rectangle = new RectangleF(0,0,36,16);
Random rd = new Random();
int valationNo = 1000 + rd.Next(8999);
g.FillRectangle(new SolidBrush(Color.BurlyWood),rectangle);
g.DrawString(valationNo.ToString(),textFont,new SolidBrush(Color.Blue),rectangle);
newBitmap.Save(Server.MapPath("img")+"\\19.gif",ImageFormat.Gif);
}