using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls Using system.web.ui.htmlcontrols; using system.io;
Namespace megabbs.sendmail {/// /// WebForm4 summary description. /// summary> public class Webform4: system.web.ui.page {private void page_load (Object sender, system.eventargs e) {// Place user code here to initialize page if (! this.ispostback) {Binddata ();}}
#Region Web Form Designer Generated Code Override Protected Void OnNit (Eventargs E) {// // Codegen: This call is required for the ASP.NET Web Form Designer. // InitializeComponent (); base.onit (e);} /// /// Designer Supports the required method - Do not use the code editor to modify the // / this method. /// summary> private () {this.load = new system.eventhandler (this.page_load);} #ENDREGION
/// /// Picture with binary flow output /// summary> private void binddata () {filestream fs = new filestream (@ "D: /22-11-46-3-524454584.jpg , FileMode.open, FileAccess.Read; byte [] mydata = new byte [fs.length]; intlene = convert.Toint32 (fs.length); fs.read (mydata, 0, length); fs.close ); This.Response.OutputStream.write (MyData, 0, Length); this.Response.end ();}}}