Recent Posts

0
Comments

Convert Array of Objects to a Generic List by Kiyoshi

Working with generic lists is a lot easier and fun than working with arrays. To convert an array to a generic list use the following code. (List of string in example) C# string stringSet = " a,b,c,d "; string [] stringArray = stringSet.Split( new char...
1
Comments

Sorting a generic list in ascending or descending order by Kiyoshi

Sorting a generic list can be as easy as 3 lines.  Use the Sort method to accomplish this task.  More info about List<T> can be found here .       class TestSort     {        ...
1
Comments

Render aspx page as a string by Kiyoshi

To render a page into a string use a StringWriter object.  This can be useful when making AJAX type of queries.  Using an aspx page for AJAX calls makes it easy to reference session state information.          ...
0
Comments

Convert Database String to DateTime by Kiyoshi

When debugging database datetime in my apps, I like to sometimes fake the data going to the database.  Heres a code snippet that converts a database string to a DateTime object.   DateTime testDate = DateTime .ParseExact( "2006-10-20 15...
1
Comments

Using Reflection and Type.GetType by Kiyoshi

Recently I had to use Type.GetType to use Remote Objects in IIS (yea its old) and I kept running into a problem with Type.GetType("...") returning null. So after trying and trying and rechecking my spelling over and over, I discovered this article...
0
Comments

WCF - Using WebHttpBinding for REST services by Kiyoshi

You can use WebHttpBinding to have REST endpoints in your WCF application to expose simple public service calls.  Use a UriTemplate in your service contract and a WebHttpBinding endpoint.  Here's an example...   (IContractName.cs) namespace...
Filed under:
1
Comments

Get an Enum value from a string by Kiyoshi

I love to use enumerated datatypes for programming.  This code snippet is really useful for getting an enum value from it's name rather than it's integer index. The original article was here: http://blog.paranoidferret.com/index.php/2007/09/17/csharp...
0
Comments

Update browser cache for CSS and JS files for modified files by Kiyoshi

When working with CSS and JS I've noticed that sometimes the browser (ex: Firefox) doesn't download the latest version of the .css or .js files that I'm working on and goes straight to it's cached version.  So my solution for this is to add a querystring...
4
Comments

DateTime.ToString() Patterns by Kiyoshi

I've taken this from: http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm   because I use it so much and would be devastated if it ever went down :)   0 MM/dd/yyyy 08/22/2006 1 dddd, dd MMMM yyyy Tuesday, 22 August 2006 2...
4
Comments

Cool Javascript Tools for the Web by Kiyoshi

The AJAX control toolkit is great, but it's always better to have more tools and controls. I found a few great sites that have really nice demos and open source javascript code to make your site look cool. http://orangoo.com/labs/GreyBox/ http://cow.neondragon...
Filed under:
More Posts Next page »