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
相关文档:
/// <summary>
/// 方法一:通过使用 new 运算符创建对象
/// </summary>
/// <param name="strSource">需要加密的明文</param>
/// <returns>返回16位加密结果,该结果取32位加密结果的第9位到25位</returns>
public string Get_MD5_Method1(strin ......
后台:
string strDate = DateTime.Now.ToString("yyMMdd") + "\\" + DateTime.Now.ToString("yyyyMMddHHmmss");
string strFileName = strDate + ".html";
string strTitle = this.Txt_C_Name.Text.Trim();
string strContent = this.Content.Value.Trim();
string[] conten ......
ASP.NET Web 部件是一组集成控件,用于创建网站使最终用户可以直接从浏览器修改网页的内容、外观和行为。这些修改可以应用于网站上的所有用户或个别用户。当用户修改页和控件时,可以保存这些设置以便跨以后的各浏览器会话保留用户的个人首选项,这种功能称为个性化设置。这些 Web 部件功 ......
在IIS URL Rewriting 和 ASP.NET routing(上)中,我们针对IIS URL Rewriting 和 ASP.NET routing的理念和功能分别进行分析并进行对比,在清楚了这些基本原理和异同之后,我们该如何在应用中挑选合适的URL优化方案呢?在本文中,我们将对此进行探讨分析,并例举几种两者协同应用的案例。
本文翻译自IIS官方网站,针对国内 ......
使用ASP.NET开发网站时,如果URL中传递的参数过长(具体多长没有测试)的话,在使用IE6浏览时,就会出现通过QueryString获得的值不完整,或者出现乱码的情况。其解决方法是:在Web.config中的System.web配置节中添加如下代码即可:
<globalization requestEncoding="gb2312" responseEncoding="gb2312" ......