asp.net 图片 画线
Bitmap srcImg = new Bitmap(300, 300); //也可以读入一张图片
Graphics graphics = Graphics.fromImage(srcImg);
Font font = new Font("宋体", 16); //字体与大小
Brush brush = new SolidBrush(Color.Red);
graphics.DrawString("www.cftea.com", font, brush, 50, 50); //写字,最后两个参数表示位置
Pen pen = new Pen(Color.fromArgb(33, 66, 99), 10); //颜色与宽度
Point[] pts = new Point[3]; //曲线的点
pts[0] = new Point(120, 130);
pts[1] = new Point(140, 280);
pts[2] = new Point(200, 100);
graphics.DrawCurve(pen, pts); //画曲线
srcImg.Save(Server.MapPath("example.jpg"));
graphics.Dispose();
srcImg.Dispose();
相关文档:
关闭窗体
1.
this.btnClose.Attributes.Add("onclick", "window.close();return false;");
2.关闭本窗体间跳转到另一个页面
this.HyperLink1.NavigateUrl = "javascript:onclick=window.opener.location.assign
......
//平常调用javascript方法
ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert'Weclome!!!');</script>");
背景不为白色的方法:
Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('添加失败,请联系技术员!') ......
在不同版本的 IIS 上使用 ASP.NET MVC
ASP.NET MVC Framework 依赖于 URL 路由。为了利用 URL 路由,可能不得不在 Web 服务器上执行额外的配置步骤。这些步骤取决于 Internet Information Services (IIS) 的版本和应用程序的请求处理模式。
IIS 的最新版本是版本 7.0。IIS 的此版本包括在 Windows Server 2008 中。还可以 ......
FileUp.aspx 页面
1<%@ Page language="c#" Codebehind="FileUp.aspx.cs" AutoEventWireup="false" Inherits="TestCenter.FileUp" %>
2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
3<HTML>
4 <HEAD>
5 &l ......
URL 重写是截取传入 Web 请求并自动将请求重定向到其他 URL 的过程。
比如浏览器发来请求hostname/101.aspx ,服务器自动将这个请求中定向为http://hostname/list.aspx?id=101。
url重写的优点在于:
缩短url,隐藏实际路径提高安全性
易于用户记忆和键入。
&nbs ......