ASP.NET News from Blogger:
Black Belt Coder Article Feed
Total News: 24
The JPG graphics format supports varying level of compression and quality. Although it isn't readily visible, the Image.Save() method allows you to control this level. Here's a sample C# method that d...
ASP.NET MVC's Html.BeginForm() provides a handy shortcut for creating forms in your view. This article describes using Ajax.BeginForm(), which brings the same type of shortcut for implementing forms t...
This article presents code that uses AJAX to contact the server from client-side script and get a response without refreshing the current page....
Here's a short snippet of code you can use to strip out HTML tags from a block of text....
ASP.NET Web Form controls provide the FindControl method for finding child controls. However, FindControl does not find child controls of child controls. So here's a simple extension method that will ...
This article demonstrates how to populate a control from JavaScript by calling a server-side method. The server-side method returns the data (from a database or anywhere else), which the JavaScript us...
An easy way to share data with programs like Microsof Excel is to read and write Comma-Separated Values (CSV) files....
SQL Server's Full-Text Search offers a powerful and efficient way to search your data. However, the Full-Text Search syntax can be rather cryptic, especially for unsuspecting users. Here's a class tha...
JavaScript that has been compressed to use less bandwidth can be very difficult to read. Here's a C# class that will format JavaScript code, making it easy to read again....
Here's some code that generates a random machineKey element suitable for pasting into your ASP.NET web.config file....
Here's a custom web control that makes it very easy to display Google DoubleClick for Publisher (DFP) ads on an ASP.NET website....
RSS autodiscovery is a technique that allows browsers and other software to automatically detect any RSS feeds associated with a particular website....
.NET provides the Convert class, which among other things can convert between integers and strings using different bases. Inexplicably, the Convert class only supports base 2, 8, 10 and 16. Here's a c...
I recently wrote about converting plain text to HTML. Here's some code to convert HTML back to plain text. This code should come in handy for any situation where you need to extract plain text from th...
Here's a simple routine that will format a string as HTML so that it can be displayed on a web page. It extends the functionality offered by the HttpUtility.HtmlEncode() method....
Technologies like Entity Framework are cool, but accessing ADO.NET directly is still a little faster. For developers still using plain old ADO.NET to query SQL Server databases, here's a helper class ...
.NET applications can use Environment.CommandLine to access any command-line arguments that were supplied to the program. However, there's more work to do if your command line support many options. He...
The .NET Frameworks provide a rich assortment of classes for dealing with the Internet. However, piecing together working FTP code can be time-consuming. Here's a ready-made FTP client class, along wi...
The .NET frameworks make it easy to resize an image programmatically. Here are some routines I used on a website to process avatars uploaded by users....
Extension methods are a cool new feature of C#. This article describes extension methods and presents a sample for the String class that can be used to parse tokens....
An easy way to add HTML controls to your webform at runtime is to use HtmlGenericControl. However, this class always renders both an opening and closing tag. This article presents a version that is se...
C and C++ developers have used the sscanf() function for many years as a quick and easy way to parse well-structured input. Here's a class that brings the same functionality to .NET....
This article describes the Boyer-Moore exact pattern matching algorithm, presents C# code that implements the algorithm, and then tells you why you probably should not use the code....
Use the QueryBuilder class to programmatically create SQL queries. This article also discusses the pros and cons of such an approach....
View Other bloggers