Geeks With Blogs
Fórmulas e Cenas Object Reference Not Set to an Instance of an Object April 2009 Entries
Best Pratices Plage
Today I will grumble about "best practices". It seams to me that a paranoia for "best practices" has overcome a lot of developers, some may even refusing to start a new task if they are not sure that the way it's going to be implemented meets a "best practice". What Exactly is a "best practice" anyway? A quick search reveals the following: Processes and activities that have been shown in practice to be the most effective. Standard, published operating methods found to produce the best performance ......

Posted On Wednesday, April 22, 2009 6:29 PM

Export Aspx to Excel
Just a simple snippet to show how an aspx can be exported to Excel Response.ClearContent(); Response.Buffer = true; Response.ContentType = "application/"; Response.AddHeader("content... "attachment; filename=" + "teste" + ".xls;charset=iso-8859-1"); StreamWriter sw = new StreamWriter(Response.Outpu... System.Text.Encoding.GetEnc... HtmlTextWriter htmlTextWriter = new HtmlTextWriter(sw); this.RenderControl(htmlText... Response.End(); ......

Posted On Friday, April 17, 2009 5:49 PM

Get ASPX rendered HTML
Today I will post some sample code to get the html thar is generated from an aspx. It's quite usefull to create emails, pdfs and so on.

Enjoy :)

StringWriter str = new StringWriter();

HtmlTextWriter htmlSTRINGWriter = new HtmlTextWriter(str);

String myHtml = str.ToString();

Posted On Friday, April 17, 2009 5:47 PM

Copyright © Sglima | Powered by: