62,074
社区成员
发帖
与我相关
我的任务
分享
//防止缓存
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1);
Response.Expires = 0;
Response.CacheControl = "no-cache";
string[] str = RadioButtonList1.SelectedItem.Text.Split(',');
if (str.Length == 2)
{
string str1 = str[0];
string str2 = str[1];
Mkimg(str1, "temp1.bmp");
Mkimg(str2, "temp2.bmp");
}
protected void Mkimg(string str,string imgname)
{
Img img1 = new Img();
img1.Text = str;
//img1.BgColor = Color.FromArgb(183, 0, 0);//背景颜色
img1.BackgroundImage = Server.MapPath("images/back.jpg");//背景图片
img1.Red = 255;//RGB三色先显示文字的颜色
img1.Green = 255;
img1.Blue = 255;
img1.ResultImage = Server.MapPath(imgname);
img1.Create();//生成图片
}