Create ThumbNail from image byte[]
private byte GenerateThumbNail(byte foto){
System.IO.MemoryStream memStream = new System.IO.MemoryStream(foto);
int thumbWidth = 88; int thumbHeight = 100; if (QueryStringHelper.ItemType == "detail"){ thumbWidth = 250;thumbHeight = 250;}
System.Drawing.Image myImage = System.Drawing.Image.FromStream(memStream);
HtmlImage...
Aprovisionamento de sites no IIS6 usando uma aplicação ASP.NET
O exemplo apresentado de seguida permite efectuar a criação de um site no IIS6 a partir de uma template. Esta solução torna-se particularmente útil para cenários em que seja necessário...
Posting back in a modal popup
If you have a server-side form that needs to post back to itself, and that form is in a window made available through window.showModalDialog call, the postback will cause...
Como Serializar um Objecto para XML e Deserializar um XML para Objecto
Serializar um Objecto para String (XML)
StringWriter sw = new StringWriter();
XmlSerializer serializer = new XmlSerializer(typeof(OBJECT));
serializer.Serialize(sw, getAcessoryEquipmentsRequest.SearchCriteria);
strXML = sw.ToString();
Deserializar uma String (XML) para Objecto
StringReader sr = new StringReader(strXML);
XmlSerializer serializer =...
The Controls collection cannot be modified because the control contains code blocks (i.e. )
Because I have pages with the markup <%= someVariable%> like <script type="text/javascript">
function ConfirmCallBack(arg)
...
How to serialize an array or a list?
I needed to serialize an array few weeks ago and i found one way to perform this serialization.I performed the serialization for the following objects:_persons.Add(new Employee { FirstName =...
Smaller .NET 6 docker images
Introduction
This post compares different strategies to dockerize a .NET 6 application and how to create a < 100mb docker image to host a .NET 6 asp.net web application. Using...
Setting the original file name when using Response.BinaryWrite()
Imagine you have file saved in a database. Then you have an aspx page that gets that page and sends it back to the user.
If you just simply use Response.BinaryWrite you...
Ajax.NET – A free library for the Microsoft .NET Framework
Asynchronous JavaScript with XmlHttpRequest - C# Example
Download the latest Ajax.dll (5.5.13.1) to use it for free in your web projects.
To learn more about AJAX, visit:WikipediaA New Approach to Web...
log4net PatternLayout and PatternConverter
I have the following scenario:
I'm using Unity dependency injection container and interception techniques to log some WCF operation calls. I need to log the input parameters and also the...