Response.Clear(); Response.Buffer = true; Response.AddHeader("content-disposition", "attachment;filename= "+_Labelname.Text+".doc"); Response.Charset = ""; Response.ContentType = "application/vnd.ms-word "; StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); string HTMLdata = "<HTML><HEAD></HEAD><BODY><BR><BR><BR><BR><BR>"+ "<p style=\"text-align: right;\"><span style=\"font-size:12px;\"><span style=\"font-family:Calibri (Body),serif;\">SGH-" + _Labelvouno.Text + "</span></span></p>" + "<p style=\"text-align: center;\"><span style=\"font-size:22px;\"><span style=\"font-family:Lucida Calligraphy,serif;\">Voucher for him</span></span></p>" + "<BR><BR>" + "<tr><Center><span style=\"font-size:25px;\"><span style=\"font-family:Book Antiqua,serif;\">We are pleased to issue a discount voucher to<BR/> Mr. " + _Labelname.Text + " Mobile " + _Labelmobile.Text + ".<BR> " + "<Center><span style=\"font-size:25px;\"><span style=\"font-family:Book Antiqua,serif;\">Under this voucher he is entitled to get " + _Labeldisc.Text + " Discount on<BR>" + "<Center><span style=\"font-size:25px;\"><span style=\"font-family:Book Antiqua,serif;\">" + _Labelcamp.Text + "<BR><BR>" + "<Center><span style=\"font-size:15px;\"><span style=\"font-family:Lucida Calligraphy,serif;\">For your appointment<BR>" + "</B></BODY></HTML>"; hw.Write(HTMLdata); Response.Output.Write(sw.ToString()); Response.Flush(); Response.End();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)