KnowDotNet NetRefactor

.NET Basics

This section contains articles relating to various aspects of programming in .NET.  


Articles  

Using Predicate Delegates and Lambda Expressions in C# -
How to cut down the amount of code used to accomplish a task using delegates, Predicates, Anonymous Methods and Lambdas in C#.    more...

Parsing XML With ADO.NET DataSet ReadXML -
Multiple ways to parse XML, and DataSet ReadXML is easier than using the XML Document Object.    more...

Use Application Wrapper Class To Access Web.Config Values -
Use an Application Wrapper Class to place accessing of all configuration parameters in one place that the whole web application can reference so that you always know where to go to get configuration settings.     more...

Use ViewState Properties Instead of Referencing ViewState Directly -
Have you ever misspelled a ViewState Variable Name? If you have, you probably found out only after trying to debug to find why your Web App was not running. Using ViewState properties gives intellisence and removes the chance of misspelling the name of the ViewState variable name.    more...

Use HTTPRequest To Create a Web Browser Business Object -
Create a Web Browser Business Object to return information about the Web Browser being used to accept your Web Site.    more...

Log Browser Info For Trouble Shooting Web Application Errors -
Log Browser Info For Trouble Shooting Web Application Errors. Use HTTPContext.Current Request Object to get Browser Information.    more...

Pass delegate as Anonymous Method in C# To Sort List of Objects -
How can I sort a List of generic objects? Use a Delegate and the default Sort method of the List Object.    more...

Using a Scrollable Div To Show Multiline Data in ASP.NET -
How do I get a Div to Scroll? I need to show a page of read only data and want the page to look clean, not using ReadOnly TextBox Controls.    more...

Creating and Parsing Excel Compatible CSV Files -
How do I create and parse a true Excel Compatible CSV file? How does Excel treat CSV files?    more...

Highlighting Search Text Results in ASP.NET Search Page -
How do I highlight search text results in ASP.NET search page?    more...


plus 178 more...

Code  

ListView Drag & Drop With Auto Scrolling in .NET (Upgraded) -
Need to have your ListView scroll while using Drag and Drop? This article shows the code. It's not complex, but the documentation is hard to locate in .NET.    more...

Print Contents of Grid or ListView -
I am constantly faced with the requirement to print the contents or selected columns of a DataGrid or ListView. This article presents a description and all of the code for a demo project to accomplish this.    more...

Updater Application Block - Writing a Wrapper DLL -
How do I write a wrapper DLL so that I can use it over and over without duplicating all of the self-updating code and use it in both VB.NET and C# Applications? In this article, I will show your the code (C#) for a DLL that wraps the Upadater Application Block.    more...

.NET Printing is Different, but much more Powerful and Flexible than in VB6 -
Why Migrate to .NET? Printing is completely different, but much more powerful and flexible than VB6.    more...

TextToStringBuilder -
Let this FREE tool build code for a StringBuilder based on your text input. Great for long message strings or SQL queries. Generates code in VB.NET or C#.NET.    more...

Use XML Files to Replace The Registry for GetSetting And SaveSetting VB Functions -
If your application has to save settings, you should not count on being able to write to the system Registry. Why not use an XML file to save your settings?    more...

Dealing with Colors in VB.NET -
The System.Drawing.Color enumeration in .NET provides a whole host of colors and is very easy to use. For instance, if I wanted to change the background color of a form, I could use the following:    more...

RichTextExplorer -
Download RichTextExplorer today and simultaneously edit the RTF and Text of a document. Executable and full source code are available.    more...

Writing Add-Ins for Visual Studio .NET
Writing Add-ins for Visual Studio .NET
by Les Smith
Apress Publishing