我创建了一个web网站(语言选的是C#),我在网页中画一个折线图,但是折线图在网页中没有显示,请问我该怎么解决,谢谢!!!
我的网页代码如下:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Data.SqlClient;public partial class Admin_jjz_graphics : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        this.CreateImage();
    }    private void CreateImage()
    {
        int height = 440, width = 600;
        Bitmap image = new Bitmap(width, height);
        Graphics g = Graphics.FromImage(image);        try
        {
            //清空图片背景色
            g.Clear(Color.White);            Font font = new System.Drawing.Font("Arial", 9, FontStyle.Regular);
            Font font1 = new System.Drawing.Font("宋体", 20, FontStyle.Regular);
            Font font2 = new System.Drawing.Font("Arial", 8, FontStyle.Regular);
            LinearGradientBrush brush = new LinearGradientBrush(new Rectangle(0, 0, image.Width, image.Height), Color.Blue, Color.Blue, 1.2f, true);
            g.FillRectangle(Brushes.AliceBlue, 0, 0, width, height);
            Brush brush1 = new SolidBrush(Color.Blue);
            Brush brush2 = new SolidBrush(Color.SaddleBrown);            g.DrawString("1997年-2006年出生人口的男女比例", font1, brush1, new PointF(100, 30));
            //画图片的边框线
            g.DrawRectangle(new Pen(Color.Blue), 0, 0, image.Width - 1, image.Height - 1);            Pen mypen = new Pen(brush, 1);
            Pen mypen2 = new Pen(Color.Red, 2);
            //绘制线条
            //绘制纵向线条
            int x = 60;
            for (int i = 0; i < 10; i++)
            {
                g.DrawLine(mypen, x, 80, x, 340);
                x = x + 50;
            }
            Pen mypen1 = new Pen(Color.Blue, 2);
            g.DrawLine(mypen1, x - 500, 80, x - 500, 340);            //绘制横向线条
            int y = 106;
            for (int i = 0; i < 9; i++)
            {
                g.DrawLine(mypen, 60, y, 560, y);
                y = y + 26;
            }
            g.DrawLine(mypen1, 60, y, 560, y);
        }
        finally
        {
            g.Dispose();
            image.Dispose();
        }
    }
}