我把具体代码放到这里,大家看看
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Import Namespace = "System.Drawing" %>
<%@ Import Namespace = "System.Drawing.Imaging" %>
<%@ Import Namespace = "System.Drawing.Drawing2D" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
// Create a font style.
Font rectangleFont = new Font(
"Arial", 10, FontStyle.Bold);
// Create integer variables.
int height = 100;
int width = 200;
// Create a bitmap and use it to create a
// Graphics object.
Bitmap bmp = new Bitmap(
width, height, PixelFormat.Format24bppRgb);
Graphics g = Graphics.FromImage(bmp);
g.SmoothingMode = SmoothingMode.AntiAlias;
g.Clear(Color.LightGray);
// Use the Graphics object to draw three rectangles.
g.DrawRectangle(Pens.White, 1, 1, width - 3, height - 3);
g.DrawRectangle(Pens.Aquamarine, 2, 2, width - 3, height - 3);
g.DrawRectangle(Pens.Black, 0, 0, width, height);
// Use the Graphics object to write a string
// on the rectangles.
g.DrawString(
" Samples", rectangleFont,
SystemBrushes.WindowText, new PointF(10, 40));
// Save the bitmap to the response stream and
// convert it to JPEG format.
bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
// Release memory used by the Graphics object
// and the bitmap.
g.Dispose();
bmp.Dispose();
}
</script>
<html xmlns="http://www. >
<head id="Head1" runat="server">
<title>CheckBox Control</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>CheckBox Control</h1>
<asp:Label ID="lblTime" runat="server" OnInit="lblTime_Init" />
<br />
<br />
<asp:CheckBox ID="chkUnderLine" runat="server" AutoPostBack="True" Text="Underline?" TextAlign="Left" OnCheckedChanged="chkUnderLine_CheckedChanged" />
<asp:CheckBox ID="chkOverLine" runat="server" AutoPostBack="True" Text="Overline?" OnCheckedChanged="chkOverLine_CheckedChanged" />
<asp:CheckBox ID="chkStrikeout" runat="server" AutoPostBack="True" Text="Strikeout?" OnCheckedChanged="chkStrikeout_CheckedChanged" />
</div>
</form>
</body>
</html>
这个代码中的 CheckBox都不可见了,怎么回事?