ASP:Chart Colour Palette

In ASP.Net there is a really easy way to create charts, using the asp:chart tag.

There are pre-defined colour palettes that you can use, or you can create your own. Here are the built in ones:

Berry: 8A2BE2,BA55D3,4169E1,C71585,0000FF,8019E0,DA70D6,7B68EE,C000C0,0000CD,800080
Bright: 008000,0000FF,800080,800080,FF00FF,008080,FFFF00,808080,00FFFF,000080,800000,FF3939,7F7F00,C0C0C0,FF6347,FFE4B5
BrightPastel: 418CF0,FCB441,DF3A02,056492,BFBFBF,1A3B69,FFE382,129CDD,CA6B4B,005CDB,F3D288,506381,F1B9A8,E0830A,7893BE
Chocolate: A0522D,D2691E,8B0000,CD853F,A52A2A,F4A460,8B4513,C04000,B22222,B65C3A
EarthTones: 33023,B8860B,C04000,6B8E23,CD853F,C0C000,228B22,D2691E,808000,20B2AA,F4A460,00C000,8FBC8B,B22222,843A05,C00000
Excel: 9999FF,993366,FFFFCC,CCFFFF,660066,FF8080,0063CB,CCCCFF,000080,FF00FF,FFFF00,00FFFF,800080,800000,007F7F,0000FF
Fire: FFD700,FF0000,FF1493,DC143C,FF8C00,FF00FF,FFFF00,FF4500,C71585,DDE221
GrayScale: C8C8C8,BDBDBD,B2B2B2,A7A7A7,9C9C9C,919191,868686,7A7A7A,707070,656565,565656,4F4F4F,424242,393939,2E2E2E,232323
Pastel: 87CEEB,32CD32,BA55D3,F08080,4682B4,9ACD32,40E0D0,FF69B4,F0E68C,D2B48C,8FBC8B,6495ED,DDA0DD,5F9EA0,FFDAB9,FFA07A
SeaGreen: 2E8B57,66CDAA,4682B4,008B8B,5F9EA0,38B16E,48D1CC,B0C4DE,8FBC8B,87CEEB


Usage example (for a bar chart)

<asp:Chart ID=”chartClients” runat=”server” Height=”800px” Width=”1000px” >
<asp:Title Font=”Calibri, 12pt, style=Bold, Italic” Name=”Title1″ Text=”This is the title of the chart”></asp:Title>
<asp:Series Name=”Series1″ Label=”#VAL” Palette=”Berry” XValueMember=”<Field Name that is text>” YValueMembers=”<Field name that is number>” IsValueShownAsLabel=”False” ChartType=”Column” XValueType=”String” YValueType=”Int32″ />
<asp:ChartArea Name=”ChartArea1″ Area3DStyle-Enable3D=”true”>
<AxisX Interval=”1″ LabelAutoFitStyle=”LabelsAngleStep90″>
<AxisY Interval=”10″ LabelAutoFitStyle=”LabelsAngleStep90″>

Visual Studio Keyboard Shortcuts

I always struggle to remember particular keyboard shortcuts for Visual Studio – there are just so many!

The most common ones we use are

Ctrl + K + C (Comment)

Ctrl + K + U (Un-Comment)

Ctrl + K + D (Format Document)

There is a complete list of all Visual Studio shortcuts that is really useful on

ASP.Net load items – an efficient way to check for isDBNull to populate a control

This was the original way to check for a database field being null before putting it into a label:

if not isDBNull(dr(“FieldName”)) then

Me.label1.text = dr(“FieldName”).ToString


Me.label1.text = “”

end if

however there is a much better and more efficient way….

Me.label1.text = dr.field(of String)(“FieldName”)


Checking for null when querying a datatable or dataview in ASP.Net (VB)

You can check for null when applying a select or a filter to a datatable or dataview it is easy to filter by a field that is equal to something, but much more difficult to check if it is null.

For example (dataview):

        Dim dv As DataView = Db.GetData("uspDatabaseMenuiser_Select").Tables(0).AsDataView
        dv.RowFilter = "ParentMenuID = 0"
        dv.Sort = "MenuTitle ASC"

As you can see from the rowFilter we are getting where ParentMenuID = 0, but what if we want to check if ParentMenuID is null?

        Dim dv As DataView = Db.GetData("uspDatabaseMenuiser_Select").Tables(0).AsDataView
        dv.RowFilter = "IsNull(ParentMenuID, '') <> ''"
        dv.Sort = "MenuTitle ASC"


Folder called Reports requires extra username and password?

We have had a recurring, and very annoying problem on some of our live servers – when trying to access any folder in IIS called “reports” it was asking for additional login information, and not showing the actual content from the folder. A bit of digging revealed that the culprit was SQL Server 2008 R2 Reporting Services.

Turning off Reporting Services didnt have any effect, we just got a 503 Error.


Click on Start

Type in Reporting Services Configuration Manager

Click on Report Manager URL on the left hand side of the Reporting Services Configuration Manager – by default it is set to “Reports”, as you can see here, we have already changed ours to “SQLReports”

Please leave a comment if this has helped you resolve the same problem we had!

ISArc drags the Kiosk into the 21st Century


So today we began another revolution – to drag the humble “web-kiosk” into the 21st century.

Our goals were clear:

  • Create kiosk software that actually works and allows users to browse the web un-hindered by previous users
  • 100% remotely controlled by a central web-based information management system
  • Allow for whitelist of approved websites
  • Must run on low-power Atom-based PCs (but still require Windows 7 – for now)
  • Must use Internet Explorer 9 (or an implemention of the IE browser engine)
  • Must have “session” management – allowing for the creation of individual session logons
  • Must provide reporting on time-spent, number of users etc
  • Must have a catchy name
  • Must be very very very easy to use and manage
  • Must be “self-fixing” – and require zero maintenance call-outs
  • Must allow for the recording of activity
  • Must allow for the remote termination of a session

the result….

A visual basic (framework 4) custom browser application that replaces Windows Explorer, connects using web services to an information management system written in ASP.Net Framework 4 with Microsoft SQL Server running behind the scenes and automatically re-sets everything at the end of the browsing session.


the work continues!