by Pieter Brinkman
27. April 2010 04:43
I use the following method to return a parent control of a specific type. This method is recursive and uses generics.
[code:c#]
private Control GetParentControl<T1>(Control control)
{
if (control.Parent.GetType() == typeof(T1))
{
return control.Parent;
}
else
{
return GetParentControl<T1>(control.Parent);
}
}
[/code]
by Pieter Brinkman
19. April 2010 09:25
With the following code you can convert your MemoryStream to a Byte Array.
[code:c#]
//create new Bite Array
byte[] biteArray = new byte[memoryStream.Length];
//Set pointer to the beginning of the stream
memoryStream.Position = 0;
//Read the entire stream
memoryStream.Read(biteArray, 0, (int)memoryStream.Length);
[/code]
by Pieter Brinkman
7. April 2010 03:08
A few years after building the free travelblog site Globallog.nl in PHP. I started building a new version in .Net together with Mark. Although this was a joyful and educational experience, we never finished this project… Now a few years later I finished a new travelblog portal; Gaatverweg.nl.
Gaatverweg.nl is build with Wordpress MU (php) and uses multiple Wordpress plugins and a few custom build plugins.