Archive for the ‘ASP.NET C#’ Category
Thursday, November 19th, 2009
A summary of streams in .NET.
TextReader [abstract]
-----> StringReader
-----> StreamReader
TextWriter [abstract]
-----> StringWriter (uses underlying StringBuilder)
-----> StreamWriter
Posted in ASP.NET C#, C# | No Comments »
Tuesday, November 10th, 2009
Having begun programming with ASP.NET from its inception where you wrote your own solutions to common problems, I've found the introduction of ObjectDataSource objects and similar functionality a blessing and a curse. Although they can save a bit of coding I always find my self wasting lots of time trying ...
Posted in ASP.NET C#, C# | No Comments »
Tuesday, June 30th, 2009
Every time I need to parse a URL or to extract parts of a URL in ASP.NET C# I can never remember what I did last time and need to refer to the documentation. So, in order to quickly answer the question "How can I get the elements of a ...
Posted in ASP.NET C#, C#, HTML | No Comments »
Monday, June 22nd, 2009
I recently needed to do a WHERE X IN () style query using LINQ to SQL. Here's the solution I used:
Posted in ASP.NET C#, C#, LINQ TO SQL, SQL Server | No Comments »
Monday, June 8th, 2009
Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type. Extension methods are a special kind of static method, but they are called as if they were instance methods on the extended type. For client code written ...
Posted in ASP.NET C#, C# | No Comments »
Monday, June 8th, 2009
The yield keyword signals to the compiler that the method in which it appears is an iterator block. The compiler generates a class to implement the behavior that is expressed in the iterator block. In the iterator block, the yield keyword is used together with the return keyword to provide ...
Posted in ASP.NET C#, C#, Uncategorized | No Comments »
Sunday, November 30th, 2008
In addition to supporting server databases, Visual Studio 2005 / 2008 also supports local databases in an App_Data folder. Finding a clear answer as to what the folder is for was not easy but my basic understanding is this:
Posted in ASP.NET C#, SQL Server | No Comments »
Saturday, November 29th, 2008
Due to the increasing number of data access strategies being introduced to .NET with little guidance on which to use I decided to create an overview of the different methodologies available. This is really just a cheatsheet for myself but maybe it's useful to others as well...
Posted in ASP.NET C#, SQL Server, Uncategorized | 1 Comment »
Monday, June 2nd, 2008
This article will demonstrate a complex and real world example of how to implement ASP.NET output caching on portions of your pages. My next article will explain the more difficult task of how to programmatically clear the cache whenever you choose!
Posted in ASP.NET C#, Uncategorized | No Comments »
Thursday, May 29th, 2008
Here's an interesting problem I encountered recently. With a traditional ASP.NET web application each time a user requests a page from the server, the server will reset the user's session timeout counter and hence prevent the user's session from timing out. However, suppose I have an AJAX.NET application which is ...
Posted in AJAX.NET, ASP.NET C#, Javascript | No Comments »