GDI+入门(九、ASP.NET中GDI+)
九、ASP.NET中GDI+
protected void Page_Load(object sender, EventArgs e)
{
string Filename;
System.Drawing.Image g;
Filename = Server.MapPath("./1.jpg");
g = System.Drawing.Image.fromFile(Filename);
Response.ContentType = "image/jpeg";
g.Save(Response.OutputStream, g.RawFormat);
g.Dispose();
}
实在是太简单了,不讲了吧
Response.ContentType = "image/jpeg";
Response.OutputStream
这两个地方很重中
WebServices中使用GDI+
[WebMethod]
public Byte[] DrawChart(int north, int east, int south, int west)
{
System.IO.MemoryStream outStream;
outStream = new System.IO.MemoryStream();
float thisAngle = 0;
float totalAngle = 0;
int width = 200;
int height = width;
int diameter = width - (width / 10);
int top = (height / 2) - (diameter / 2);
&n
相关文档:
在Web编程过程中,存在着很多安全隐患。比如在以前的ASP版本中,Cookie为访问者和编程者都提供了方便,并没有提供加密的功能。打开IE浏览器,选择“工具”菜单里的“Internet选项”,然后在弹出的对话框里单击“设置”按钮,选择“查看文件”按钮,在弹出的窗口中,就会显示硬盘里 ......
jquery中已经封装了ajax的过程,使用起来很简单:
通过get方式提交:
<html>
<head>
<title>实现服务器时间实时变化</title>
<script language="javascript" type="text/javascript" src="js/jquery-1.3.1.js"></script>
& ......
ASP.NET 用户控件缓存
前台添加
后台添加
CachePolicy.SetSlidingExpiration(true);
CachePolicy.Duration = TimeSpan.fromMinutes(Hongdong.WebUI.Utility.Cdouble(Hongdong.WebUI.Utility.GetAppSettingByName("cacheTime"))); ......
1、给web.config添加<authentication>元素
2、给web.config文件添加<forms>元素
<forms name=".aspxauth" loginUrl="Login.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true" cookieless="UseDeviceProfile"></forms>
3、FormsAuthentication.Redire ......
使用 Web 部件控件,可以让用户在运行时创建两个服务器控件之间的连接,以形成连接并共享数据。一个控件用作数据的提供者,另一个控件用作数据的使用者。这两个控件可以是 WebPart 控件或任何其他类型的服务器控件。必须将它们设计为处理连接且位于 WebPartZoneBase 区域中。
在 ......