using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;public partial class DisplayPhoto : System.Web.UI.Page
{
System.Drawing.Image image = System.Drawing.Image.FromFile(@"D:\保存照片\mine.jpg");
System.IO.MemoryStream ms = new System.IO.MemoryStream();
image.Save(ms, image.RawFormat);
byte[] b = new byte[ms.Length];
try
{
Response.BinaryWrite(b);
Response.ContentType = "image/jpg";
}
catch
{
}
}
}页面提示:
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------Invalid at the top level of the document. Error processing resource 'http://localhost:1508/BlueHill/DisplayPhoto.aspx'.
请问如何解决?
{
}
有空写个关于这个的BLOG。
分都给wuyq11.