Browse by Tags
All Tags »
.net code (
RSS)
I wanted to be able to cache the results of a query from the LinqDataSource that was used in multiple places on the page. I whipped up this little class to do the work of caching for me. The class, LinqCacheDataSource, handles the Selecting and Selected events. The Selected handler inserts the result of the query into cache. The Selecting handler gets the result from the cache. If it doesn't find the result, the query runs as normal. The caching will only work for selecting data. It works great for dropdowns and other fairly static data....
The following query extension will make paging a query more natural then skip and take. Simply append Paginate(page, pageSize) to your query. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace System.Linq ...
I'd like to announce the release of a little project I've been working on. I call it Calculator.NET. I started this project for a couple reasons. First, I was annoyed that Windows Vista doesn't come with a better calculator. Windows XP has Power Calculator...
XML Serializable Generic Dictionary For some reason, the generic Dictionary in .net 2.0 is not XML serializable. The following code snippet is a xml serializable generic dictionary. The dictionary is serialzable by implementing the IXmlSerializable interface...
Here is a code snippet that is equivalent to the windows API PathRelativePathTo as native c#. The function creates a relative path from one file or folder to another. public class PathUtil { /// <summary> /// Creates a relative path from one file...
I’ve update and released a new version of Draco.NET. This release is mainly to make it compatible with Visual Studio 2005 and MSBuild. The following is a list of changes … 1.6-release-2 (1.6.4.0) Added MSBuild support Added Visual Studio 2005 support...
Announcement The MSBuild Community Tasks Project releases version v1.0.0.29. The following is a list of tasks. Current Community Tasks Task Description AssemblyInfo Generates an AssemblyInfo file using the attributes given. FtpUpload Uploads a file using...
I’d like to announce the MSBuild Community Task Collaboration Project. The project was started by me to form a directory of MSBuild Tasks for use in your build scripts. The project is also an open source collection of tasks. The project is broke into...
Here is a little test code that demonstrates how to use Generics at runtime. The code has two tests. The first test shows how to create a Generic Class at runtime. The second shows how to call a Generic method. Keep in mind that when using generics at...
I saw in this post that the Google toolbar could be extracted and looked at. So, I spend an afternoon reverse engineering the spell checker api. The api ends up to be very easy to use. Checking is done with an HTTP post to http://www.google.com/tbproxy...
More Posts
Next page »