CodePal Articles

Showing 87 posts (most recent first).


BitLocker prevents SQL Server accessing databases

SQL Server returns "device not ready" errors, and databases are labelled as Recovery Pending

Topics: SQL Server, BitLocker


Disable Whitepages unsaved caller identification on Samsung Galaxy S7

How to disable the unsaved number caller identification (Whitepages) feature in the Samsung Galaxy S7

Topics: Mobile


How to embed a Google Drive video into your web pags

How to embed a Google Drive video into your web pags from within the Google Drive file browser.

Topics: HTML


Stream/write Excel file to ASP.NET MemoryStream with EPPlus

How to create and send an Excel XLSX file on-the-fly, using EPPlus

Topics: ASP.NET


Windows 10 Review

A personal review of Windows 10 after using it for a month for professional and home use

Topics: Windows 10


Unable to set up Windows 10 Enterprise with a Microsoft Account

When installing Windows 10 Enterprise, the setup requires either a local account, an Azure AD account, or a Domain, but you only have a Microsoft account.

Topics: Windows 10


Make the ASP.Net FileUpload control work inside the UpdatePanel control

The simple and easy way to make the FileUpload.HasFile property be True when used within an UpdatePanel

Topics: ASP.NET


ADO.Net DataTables sort Null values last instead of first

Make ADO.Net behave like SQL Server when sorting DataColumns with Null values, and put Nulls last

Topics: ASP.NET


Avoiding OutOfMemoryExceptions when using StringBuilder.ToString to send files

How to create large text files and send to the user without experiencing an OutOfMemoryException on StringBuilder.ToString()

Topics: ASP.NET


Transform a List(of String) into a single string, with custom formatting

How to join together multiple strings (in an IEnumerable or List collection) into a single string, while adding bespoke formatting

Topics: ASP.NET


Sorting ListItems in a ListControl by Text or Value

A tutorial on how to easily sort ListItems inside a ListControl by Text or Value, plus an easy re-usable extension method.

Topics: ASP.NET


Make your own MS Excel Live Currency Converter

How to create a currency converter using MS Excel 2013 without add-ons

Topics: Excel


Show child rows as CSV values in SQL Server data relationships

How to leverage TSQL to show all child rows as CSV values alongside their parent rows

Topics: SQL Server


Make IIS work with local IP addresses instead of "localhost"

How to get IIS to recognise an IP address for running local websites (and for use within Fiddler)

Topics: ASP.NET, IIS


Backup Master Key fails with write permissions error

When backing up your SQL Master Key, you get a "Cannot write into file" error

Topics: SQL Server


After Samsung S4 Firmware Update - "Sync is Disabled" for Email Accounts

After updating your Samsung S4 firmware using Kies 3, all email syncing fails with a "Sync is Disabled" error

Topics: Samsung Kies 3


Using DateTime.Now for generation of unique values

Use the DateTime.Now value to generate unique values

Topics: ASP.NET


WOFF files return 404 (Not Found) in Azure Web Sites

After publishing your site to Azure, WOFF font files return a 404 error

Topics: ASP.NET, Visual Studio, Azure


Samsung Kies3 will not recognise/sync with Outlook x64

After the reintroduction of Sync to Kies3, it will not recognise 64-bit versions of Outlook

Topics: Samsung Kies 3


"1" and "0" String was not recognized as a valid Boolean

ASP.NET throws an error when you try to convert "1" and "0" strings to Boolean values

Topics: ASP.NET


No sync tab in Kies 3 following Firmware update

After device firmware upgrade, and software update to Kies 3, the sync option is gone

Topics: Samsung Kies 3


Using Fiddler to create a POST to an ASP.Net Web API

How to create a POST in Fiddler to test out a Web API

Topics: ASP.NET


USB drive cannot be seen within Windows Server 2008 Restore

The USB drive and backup images on it cannot be seen when you try to restore from the system disc or via Windows Restore

Topics: Windows 2008 Server


ICS incorrect file times and time zone problems in Outlook calendars

When importing ICS calendar entries into Outlook, the time can become incorrect by one hour, or timezones differences are ignored

Topics: ASP.NET


Disable weekends in asp:calendar control

How to disable and colour the weekend days in the asp:calendar control

Topics: ASP.NET


Reference dynamic GridView from within its RowDataBound event

How to reference the parent (container) GridView at row level during RowDataBound

Topics: ASP.NET


Highlight a Gridview (table) row on selection using JQuery

How the colour the grid view (table) row when a checkbox is checked

Topics: ASP.NET, JQuery


How to read emails from within account inboxes in HMailServer

How to view the content of emails inside users' inboxes within HMailServer

Topics: HMailServer, SQL Server


How to install an SSL certificate in IIS7 or IIS8

A full guide to installing an SSL certificate within IIS 7 or 8 then apply it to a site

Topics: ASP.NET, IIS


Type 'WindowsLiveClient' is not defined

You see an error 'Type 'WindowsLiveClient' is not defined' when working with DotNetOpenAuth and the OpenID functionality

Topics: ASP.NET


Prevent error IErrorInfo.GetDescription failed with E_FAIL(0x80004005)

Tricks and tricks to help developers avoid seeing the IErrorInfo.GetDescription failed with E_FAIL(0x80004005) error.

Topics: ASP.NET


FTPES fails in FileZilla on MLSD command with Error 425

FTP command MLSD fails when accessing FTPES using FileZilla

Topics: FTP


ASP.NET export to Microsoft Excel corrupts symbols/characters

Exporting a DataTable or GridView to MS Excel can cause corruption to certain characters and/or symbols, prefixed with â

Topics: ASP.NET


Random humour: Choices of wording in Office 2013

A geek joke about it taking 'us' longer to exit from Office 2013

Topics: Miscellaneous


Moving an SSL Certificate from IIS6 to IIS7

The process for moving/copying an installed SSL certificate from IIS6 to IIS7

Topics: IIS


Showing parent-child data using ADO.Net DataTables, DataSets & GridViews

Take two separate DataTables then combine them into a DataSet to show parent-child related data

Topics: ASP.NET


Searching for users in Active Directory using ASP.NET

How to search for users (UserPrincipals) within Active Directory

Topics: ASP.NET


How to generate a safe filename in ASP.NET

Remove illegal characters using ASP.NET to generate a filename that can be used to save a file to the operating system

Topics: ASP.NET


Avoid exception using CopyToDataTable() when no rows are found

How to avoid the 'The source contains no DataRows' error when using CopyToDataTable() if no rows are found

Topics: ASP.NET


Sending Email Attachments From a FileUpload Control Sends Empty Files

When sending multiple emails from an ASP.NET page, the attachment may be an empty file

Topics: ASP.NET


Create and format an asp:Chart programmatically

A tutorial on how to create an asp:Chart object and apply various Series and formatting working entirely in code-behind

Topics: ASP.NET


Show file count and file sizes grouped by monthly creation date in ASP.NET

Create a table and chart in ASP.NET that shows the creation date and filesize of files, grouped by monthly totals

Topics: ASP.NET


Force full page postback from inside an UpdatePanel using code behind

How to set a postback control to cause a full page postback from within an asp:UpdatePanel

Topics: ASP.NET


Using Request.Url to find specific parts of the web page's URL

An examination of the different properties within Request.Url to return specific parts of the web page's URL

Topics: ASP.NET


ASP.NET attaches .DAT files to emails

The solution to stop ASP.NET creating email attachments as DAT files, instead of the original file type

Topics: ASP.NET


Windows 8 Professional Review

A review of Windows 8 on desktop and laptop from an 'everyday' user

Topics: Windows 8


Cisco VPN client error: 'Reason 442: Failed to enable virtual adapter' on Windows 8

A solution for the error 'Reason 442: Failed to enable virtual adapter' when trying to open a VPN connection on Windows 8 with Cisco VPN Client

Topics: Windows 8


Create an ASP.NET calendar without using the asp:Calendar control

How to create a bespoke calendar from scratch without using the asp:Calendar control

Topics: ASP.NET


This configuration section cannot be used at this path (Windows 8, IIS 8)

Error when running ASP.NET pages on IIS 8: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

Topics: ASP.NET, Windows 8


How to make subroutines and functions reusable across your entire ASP.NET application

How to code subroutines and functions so that they can be used from anywhere in your ASP.NET web forms application

Topics: ASP.NET


ListControl.SelectedIndexChanged event does not fire

DropDownLists and ListBox controls fail to fire the SelectedIndexChanged event upon PostBack when a non-unique ListItem.Value is used

Topics: ASP.NET


Make an ASP.NET variable accessible across the entire page and all functions/subroutines

How to store ASP.NET variables so that they can be accessed throughout the page lifecycle, and by any functions/subroutines that are within the page

Topics: ASP.NET


How to integrate a .NET CLR UDF into SQL Server

Step by step guide showing how to create a .NET SQL CLR User Defined Function in Visual Studio and then integrate it into a SQL Server database

Topics: ASP.NET, Visual Studio, SQL Server


Changing the order of DataTable DataColumns in ASP.NET

How to easily change the order of DataColumns in an ASP.NET DataTable or DataSet

Topics: ASP.NET


Create controls dynamically within the ASP.NET Calendar control

How to access the LinkButton within a Calendar day, and how to create controls dynamically

Topics: ASP.NET


How to force a full page postback from a control inside an UpdatePanel

How to wire up an ASP.NET Button or LinkButton to cause a full page postback from inside an UpdatePanel

Topics: ASP.NET


Correctly sorting DataTables using different cultures/languages

How to sort a DataTable correctly when it contains symbols from specific cultures/languages, e.g. Å, À, Æ

Topics: ASP.NET, SQL Server


Check if DataColumn exists from within a DataTable

A simple check to see if a DataTable.DataColumn exists in a DataTable, before using it

Topics: ASP.NET


How to Sort a custom class/object in a DataTable, DataSet and GridView

When using a DataColumn containing a type of custom class/object, this article explains how to apply sorting to that DataColumn

Topics: ASP.NET


Copying DataTable.PrimaryKeys to another DataTable

How to recreate the primary keys from one DataTable in a second DataTable, duplicating the PrimaryKey array

Topics: ASP.NET


Line breaks lost and <br/> tags show when exporting to Excel file

When exporting a DataTable etc to Excel, (Alt-Enter) line breaks are lost within cells, or the <br/> tag shows

Topics: ASP.NET


Variable 'myVariableName' hides a variable in an enclosing block

An explanation of the error 'Variable hides a variable in an enclosing block' and how to avoid it

Topics: ASP.NET


Visual Studio 2010 crashes with 0xc0000005 error

Visual Studio 2010 SP1 randomly crashes with error code 0xc0000005

Topics: Visual Studio


How to DataBind a custom class object to a GridView

How to bind a custom class object to the cell within a GridViewRow

Topics: ASP.NET


Checking for multiple files in SQL with xp_fileexist

How to use the undocumented xp_fileexist procedure to check for the existence of multiple files within SQL, as part of a SELECT statement

Topics: SQL Server


ASP.NET Development Server (Cassini) causes 404 errors not seen in IIS

When viewing a web site using the Visual Studio Development server, 404 errors appear that are not present in IIS

Topics: ASP.NET, Visual Studio


Using ColumnSpan with a GridViewRow Cell

How to prevent the table structure messing up when using ColumnSpan on GridViewRow table cells

Topics: ASP.NET


Hosting multiple sites with different languages/cultures within the same domain name using resource (RESX) files

How to host multiple-company-multi-lingual websites within a single web application

Topics: ASP.NET


Validate an email address in ASP.NET

How to use ASP.NET validators to validate an email address

Topics: ASP.NET


Check if DataColumn exists from within RowDataBound

How to check that a data column actually exists within RowDataBound before binding

Topics: ASP.NET


Initialize List(Of String) in a single line

How to create and populate a List(Of String) variable in one line of code

Topics: ASP.NET


T-SQL error: Could not find type <TypeName> in assembly <AssemblyName>

SQL produces the following error when attempting to associate a CLR function with a UDF: Could not find type <TypeName> in assembly <AssemblyName>

Topics: ASP.NET, SQL Server


Return multiple new ID values created/modified by a T-SQL query

How to see the actual rows that were affected by a T-SQL query (one step beyond simple @@ROWCOUNT). Imitates finding multiple SCOPE_IDENTITY() values.

Topics: SQL Server


Generate random colours and transparencies/opacities with ASP.NET

Use ASP.NET to create random colours and transparencies, and apply them to controls

Topics: ASP.NET


The data types bigint and numeric are incompatible in the '&' operator

SQL Server commands fail when the Bitwise AND operator (&) is used with large numbers

Topics: SQL Server


Request format is unrecognized for URL unexpectedly ending in /jsdebug

A solution for when you receive errors regarding /jsdebug when calling a WebService from a page using JavaScript



How to get the asp:chart working in ASP.NET 4 (IIS 7)

A full working solution to get the asp:chart control working in ASP.NET 4.0

Topics: ASP.NET, Visual Studio


JQuery breaks after ASP.NET partial page postback

A solution to when JQuery events stop working after a partial page postback

Topics: ASP.NET, JQuery, AJAX


The basics steps for creating multi-lingual web sites

The initial steps you need to take when creating a multi-lingual web site

Topics: ASP.NET, Visual Studio, XHTML, HTML


How to Debug Visual Studio in IIS instead of Cassini

How to configure Visual Studio to perform debugging via IIS rather than Cassini

Topics: ASP.NET, Visual Studio


GridView.DataKeys Object Reference Not Set Error

You receive an error: Object Reference Not Set To an Instance of an Object when you try to read a DataKey value in code-behind

Topics: ASP.NET


ASP.NET 4.0 Page.GetRouteUrl misses out file extension

When using PageGetRouteUrl to create a new URL, the file extension is not included

Topics: ASP.NET


Windows 7 Homegroup does not have permission to view folders

A solution for when Homegroup gives an error saying that it doesn't have permissions to view folders, even though these are configured

Topics: Windows 7, Homegroup


Visual Studio 2010 Go To Definition shortcut

Jump to a method definition using CTRL+Click

Topics: ASP.NET, Visual Studio


Stream Flash SWF's using VALID XHTML on Firefox and IE 6, 7 & 8

How to stream Flash SWF files to Firefox and Internet Explorer 6, 7, 8, 9 using VALID XHTML

Topics: XHTML


Error 'Missing ) after argument list' when using JQuery

A solution to the 'Error 'Missing ) after argument list' error when using JQuery

Topics: JQuery


ASP.NET 401 Unauthorized errors with IIS7.5

Firebug shows ASP.NET 401 Unauthorized errors with IIS7.5

Topics: ASP.NET