CodePal Articles

Showing 87 posts (most recent first).

DateContent
17/08/2017

BitLocker prevents SQL Server accessing databases

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

Topics: SQL Server, BitLocker

29/03/2017

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

25/11/2016

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

21/07/2016

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

25/09/2015

Windows 10 Review

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

Topics: Windows 10

23/09/2015

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

28/08/2015

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

17/07/2015

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

11/02/2015

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

05/02/2015

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

01/10/2014

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

21/05/2014

Make your own MS Excel Live Currency Converter

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

Topics: Excel

15/04/2014

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

09/04/2014

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

08/04/2014

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

25/03/2014

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

20/02/2014

Using DateTime.Now for generation of unique values

Use the DateTime.Now value to generate unique values

Topics: ASP.NET

17/02/2014

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

08/01/2014

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

05/12/2013

"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

07/11/2013

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

25/09/2013

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

14/08/2013

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

18/07/2013

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

08/07/2013

Disable weekends in asp:calendar control

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

Topics: ASP.NET

01/07/2013

Reference dynamic GridView from within its RowDataBound event

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

Topics: ASP.NET

11/06/2013

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

22/05/2013

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

07/05/2013

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

26/04/2013

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

04/03/2013

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

11/02/2013

FTPES fails in FileZilla on MLSD command with Error 425

FTP command MLSD fails when accessing FTPES using FileZilla

Topics: FTP

08/02/2013

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

02/02/2013

Random humour: Choices of wording in Office 2013

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

Topics: Miscellaneous

18/01/2013

Moving an SSL Certificate from IIS6 to IIS7

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

Topics: IIS

23/12/2012

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

30/11/2012

Searching for users in Active Directory using ASP.NET

How to search for users (UserPrincipals) within Active Directory

Topics: ASP.NET

09/11/2012

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

09/11/2012

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

01/11/2012

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

22/10/2012

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

19/10/2012

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

19/10/2012

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

11/10/2012

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

09/10/2012

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

04/10/2012

Windows 8 Professional Review

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

Topics: Windows 8

03/10/2012

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

28/09/2012

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

20/09/2012

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

21/08/2012

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

16/08/2012

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

14/08/2012

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

20/07/2012

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

18/07/2012

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

16/07/2012

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

12/07/2012

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

09/07/2012

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

02/07/2012

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

07/06/2012

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

31/05/2012

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

31/05/2012

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

15/05/2012

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

15/05/2012

Visual Studio 2010 crashes with 0xc0000005 error

Visual Studio 2010 SP1 randomly crashes with error code 0xc0000005

Topics: Visual Studio

02/05/2012

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

27/04/2012

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

27/04/2012

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

27/03/2012

Using ColumnSpan with a GridViewRow Cell

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

Topics: ASP.NET

20/03/2012

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

01/03/2012

Validate an email address in ASP.NET

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

Topics: ASP.NET

17/02/2012

Check if DataColumn exists from within RowDataBound

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

Topics: ASP.NET

17/02/2012

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

02/02/2012

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

21/11/2011

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

05/11/2011

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

03/11/2011

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

15/09/2011

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

Topics: ASP.NET, AJAX

14/09/2011

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

31/08/2011

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

26/08/2011

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

23/08/2011

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

21/08/2011

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

12/06/2011

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

07/06/2011

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

08/04/2011

Visual Studio 2010 Go To Definition shortcut

Jump to a method definition using CTRL+Click

Topics: ASP.NET, Visual Studio

14/03/2011

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

02/02/2011

Error 'Missing ) after argument list' when using JQuery

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

Topics: JQuery

18/01/2011

ASP.NET 401 Unauthorized errors with IIS7.5

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

Topics: ASP.NET