This project uses C#, 3.5 Framework, and was created using Visual Studio 2008. If you do not own Telerik, please download and install the Telerik free trial.
In this C# project, I use RadChart to create a 3x3 Heatmap using the Gantt Chart in code-behind. HeatMapCsNannetteThacker.zip. Please also see the VB.NET version of this post.

Open the project within the HeatmapCs/HeatmapCs directory. Source code is in the HeatmapCs/HeatmapWebsite directory.
This project demonstrates how to add a user control to a web page. See the default.aspx page.
The calling page passes in the riskimpact and the risklikelihood. Normally these values would be retrieved from your database.
The Heatmapchart.ascx user control is found in the /Heatmapwebsite/Heatmap directory. In the user control, I use RadChart to display a heat map. In a 3x3 Heat Map Chart a bullet displays in the corresponding area of the chart.
The code-in-front simply stubs in the RadChart, our coding is in the code behind:
Once you've added the RadChart, you can go to Design mode, select the tab on the right of the RadChart and select to "Add RadChart HTTP Handler to Web.config."
The appropriate references will be added to the web.config file:
<add name="ChartImage_axd" verb="*" preCondition="integratedMode" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" /> <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /> <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
In our code behind, we need to import Telerik.Charting:
The RadChart is setup in the LoadChart function. This example shows how to use the Image FillType for the background labels.
This project demonstrates how to setup three ChartSeries; setup the PlotArea XAxis and YAxis, and add a ChartSeriesType.Bubble on the chart.
public void LoadChart(int impact, int likelihood)
{
ResetError();
try
{
// optionally you may setup the background with a skin or with a fillstyle color:
//chtHeatMap.Skin = "WebBlue"
// chtHeatMap.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#DADEE6")
chtHeatMap.Appearance.Border.Visible = true;
chtHeatMap.Appearance.Border.Width = 2;
chtHeatMap.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Image;
chtHeatMap.Appearance.FillStyle.FillSettings.BackgroundImage = "~\\HeatMap\\heatmap2.png";
chtHeatMap.Chart.ChartTitle.TextBlock.Text = "Residual Risk Heat Map";
chtHeatMap.Chart.ChartTitle.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#DADEE6");
chtHeatMap.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Normal;
chtHeatMap.PlotArea.XAxis.AutoScale = false;
chtHeatMap.PlotArea.XAxis.MinValue = 0;
chtHeatMap.PlotArea.XAxis.MaxValue = 3;
chtHeatMap.PlotArea.XAxis.Step = 1;
chtHeatMap.PlotArea.XAxis.Appearance.MajorTick.Visible = false;
chtHeatMap.PlotArea.XAxis.Appearance.LabelAppearance.Visible = false;
chtHeatMap.PlotArea.YAxis.AutoScale = false;
chtHeatMap.PlotArea.YAxis.MinValue = 0;
chtHeatMap.PlotArea.YAxis.MaxValue = 3;
chtHeatMap.PlotArea.YAxis.Step = 1;
chtHeatMap.PlotArea.YAxis.Appearance.MajorTick.Visible = false;
chtHeatMap.PlotArea.YAxis.Appearance.MinorTick.Visible = false;
chtHeatMap.PlotArea.YAxis.Appearance.LabelAppearance.Visible = false;
Telerik.Charting.ChartSeries seriesLow = new Telerik.Charting.ChartSeries();
chtHeatMap.AddChartSeries(seriesLow);
seriesLow.Type = ChartSeriesType.Gantt;
seriesLow.Appearance.LabelAppearance.Visible = false;
Telerik.Charting.ChartSeries seriesMedium = new Telerik.Charting.ChartSeries();
chtHeatMap.AddChartSeries(seriesMedium);
seriesMedium.Type = ChartSeriesType.Gantt;
seriesMedium.Appearance.LabelAppearance.Visible = false;
Telerik.Charting.ChartSeries seriesHigh = new Telerik.Charting.ChartSeries();
chtHeatMap.AddChartSeries(seriesHigh);
seriesHigh.Type = ChartSeriesType.Gantt;
seriesHigh.Appearance.LabelAppearance.Visible = false;
seriesLow.Name = "Low";
seriesMedium.Name = "Medium";
seriesHigh.Name = "High";
seriesLow.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#B3FFB3");
seriesMedium.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#FFFFB3");
seriesHigh.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#FFA6A6");
seriesLow.Appearance.FillStyle.SecondColor = System.Drawing.Color.Green;
seriesMedium.Appearance.FillStyle.SecondColor = System.Drawing.Color.Yellow;
seriesHigh.Appearance.FillStyle.SecondColor = System.Drawing.Color.Red;
// optionally you may set the background with a solid color
//seriesLow.Appearance.FillStyle.FillType = Styles.FillType.Solid
//seriesMedium.Appearance.FillStyle.FillType = Styles.FillType.Solid
//seriesHigh.Appearance.FillStyle.FillType = Styles.FillType.Solid
Telerik.Charting.ChartSeries seriesBubble = new Telerik.Charting.ChartSeries();
chtHeatMap.AddChartSeries(seriesBubble);
seriesBubble.Type = ChartSeriesType.Bubble;
seriesBubble.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing;
seriesBubble.Appearance.BubbleSize = 50;
seriesBubble.Appearance.PointDimentions.AutoSize = false;
seriesBubble.Appearance.PointDimentions.Height = 30;
seriesBubble.Appearance.PointDimentions.Width = 30;
seriesBubble.Appearance.FillStyle.FillType = Telerik.Charting.Styles.FillType.Gradient;
seriesBubble.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#219CEF");
seriesBubble.Appearance.FillStyle.SecondColor = System.Drawing.ColorTranslator.FromHtml("#01467D");
seriesBubble.Appearance.LabelAppearance.Visible = false;
seriesBubble.Appearance.Border.Visible = false;
Telerik.Charting.ChartSeriesItem lowItem1 = new Telerik.Charting.ChartSeriesItem();
seriesLow.AddItem(lowItem1);
lowItem1.XValue = 0;
lowItem1.XValue2 = 1;
lowItem1.YValue = 1;
lowItem1.YValue2 = 0;
Telerik.Charting.ChartSeriesItem lowItem2 = new Telerik.Charting.ChartSeriesItem();
seriesLow.AddItem(lowItem2);
lowItem2.XValue = 0;
lowItem2.XValue2 = 1;
lowItem2.YValue = 2;
lowItem2.YValue2 = 1;
Telerik.Charting.ChartSeriesItem lowItem3 = new Telerik.Charting.ChartSeriesItem();
seriesLow.AddItem(lowItem3);
lowItem3.XValue = 1;
lowItem3.XValue2 = 2;
lowItem3.YValue = 2;
lowItem3.YValue2 = 0;
Telerik.Charting.ChartSeriesItem mediumItem1 = new Telerik.Charting.ChartSeriesItem();
seriesMedium.AddItem(mediumItem1);
mediumItem1.XValue = 0;
mediumItem1.XValue2 = 1;
mediumItem1.YValue = 3;
mediumItem1.YValue2 = 2;
Telerik.Charting.ChartSeriesItem mediumItem2 = new Telerik.Charting.ChartSeriesItem();
seriesMedium.AddItem(mediumItem2);
mediumItem2.XValue = 1;
mediumItem2.XValue2 = 2;
mediumItem2.YValue = 2;
mediumItem2.YValue2 = 1;
Telerik.Charting.ChartSeriesItem mediumItem3 = new Telerik.Charting.ChartSeriesItem();
seriesMedium.AddItem(mediumItem3);
mediumItem3.XValue = 2;
mediumItem3.XValue2 = 3;
mediumItem3.YValue = 3;
mediumItem3.YValue2 = 0;
Telerik.Charting.ChartSeriesItem highItem1 = new Telerik.Charting.ChartSeriesItem();
seriesHigh.AddItem(highItem1);
highItem1.XValue = 1;
highItem1.XValue2 = 2;
highItem1.YValue = 3;
highItem1.YValue2 = 2;
Telerik.Charting.ChartSeriesItem highItem2 = new Telerik.Charting.ChartSeriesItem();
seriesHigh.AddItem(highItem2);
highItem2.XValue = 2;
highItem2.XValue2 = 3;
highItem2.YValue = 3;
highItem2.YValue2 = 2;
Telerik.Charting.ChartSeriesItem highItem3 = new Telerik.Charting.ChartSeriesItem();
seriesHigh.AddItem(highItem3);
highItem3.XValue = 2;
highItem3.XValue2 = 3;
highItem3.YValue = 2;
highItem3.YValue2 = 1;
SetRating(impact, likelihood, seriesBubble);
}
catch (Exception ex)
{
SendError(ex.Message);
}
}
The SetRating function passes in the impact and likelihood and sets the Bubble to the corresponding location in the Heatmap.
Our SendError function simply populates the error label:
Thanks to Ves, Telerik's support team, for providing a 2x2 code-in-front example. I have setup this project entirely in code-behind and added more features.
May your dreams be in ASP.NET!
Nannette Thacker
This project uses VB.NET, 3.5 Framework, and was created using Visual Studio 2008. If you do not own Telerik, please download and install the Telerik free trial.
In this VB.NET project, I use RadChart to create a 3x3 Heatmap using the Gantt Chart in code-behind. HeatMapVBNannetteThacker.zip. Please also see the C# version of this post.

Open the project within the Heatmap/Heatmap directory. Source code is in the Heatmap/HeatmapWebsite directory.
This project demonstrates how to add a user control to a web page. See the default.aspx page.
The calling page passes in the riskimpact and the risklikelihood. Normally these values would be retrieved from your database.
The Heatmapchart.ascx user control is found in the /Heatmapwebsite/Heatmap directory. In the user control, I use RadChart to display a heat map. In a 3x3 Heat Map Chart a bullet displays in the corresponding area of the chart.
The code-in-front simply stubs in the RadChart, our coding is in the code behind:
Once you've added the RadChart, you can go to Design mode, select the tab on the right of the RadChart and select to "Add RadChart HTTP Handler to Web.config."
The appropriate references will be added to the web.config file:
<add name="ChartImage_axd" verb="*" preCondition="integratedMode" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" /> <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /> <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
In our code behind, we need to import Telerik.Charting:
The RadChart is setup in the LoadChart function. This example shows how to use the Image FillType for the background labels.
This project demonstrates how to setup three ChartSeries; setup the PlotArea XAxis and YAxis, and add a ChartSeriesType.Bubble on the chart.
Public Sub LoadChart(ByVal impact As Integer, _
ByVal likelihood As Integer)
Try
' Optionally you could set a color fill:
'chtHeatMap.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#DADEE6")
' Optionally you could set a skin:
'chtHeatMap.Skin = "WebBlue"
chtHeatMap.Appearance.Border.Visible = True
chtHeatMap.Appearance.Border.Width = 2
chtHeatMap.Appearance.FillStyle.FillType = Styles.FillType.Image
chtHeatMap.Appearance.FillStyle.FillSettings.BackgroundImage = "~\HeatMap\heatmap2.png"
chtHeatMap.Chart.ChartTitle.TextBlock.Text = "Residual Risk Heat Map"
chtHeatMap.Chart.ChartTitle.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#DADEE6")
chtHeatMap.PlotArea.XAxis.LayoutMode = Styles.ChartAxisLayoutMode.Normal
chtHeatMap.PlotArea.XAxis.AutoScale = False
chtHeatMap.PlotArea.XAxis.MinValue = 0
chtHeatMap.PlotArea.XAxis.MaxValue = 3
chtHeatMap.PlotArea.XAxis.Step = 1
chtHeatMap.PlotArea.XAxis.Appearance.MajorTick.Visible = False
chtHeatMap.PlotArea.XAxis.Appearance.LabelAppearance.Visible = False
chtHeatMap.PlotArea.YAxis.AutoScale = False
chtHeatMap.PlotArea.YAxis.MinValue = 0
chtHeatMap.PlotArea.YAxis.MaxValue = 3
chtHeatMap.PlotArea.YAxis.Step = 1
chtHeatMap.PlotArea.YAxis.Appearance.MajorTick.Visible = False
chtHeatMap.PlotArea.YAxis.Appearance.MinorTick.Visible = False
chtHeatMap.PlotArea.YAxis.Appearance.LabelAppearance.Visible = False
Dim seriesLow As New Telerik.Charting.ChartSeries
chtHeatMap.AddChartSeries(seriesLow)
seriesLow.Type = ChartSeriesType.Gantt
seriesLow.Appearance.LabelAppearance.Visible = False
Dim seriesMedium As New Telerik.Charting.ChartSeries
chtHeatMap.AddChartSeries(seriesMedium)
seriesMedium.Type = ChartSeriesType.Gantt
seriesMedium.Appearance.LabelAppearance.Visible = False
Dim seriesHigh As New Telerik.Charting.ChartSeries
chtHeatMap.AddChartSeries(seriesHigh)
seriesHigh.Type = ChartSeriesType.Gantt
seriesHigh.Appearance.LabelAppearance.Visible = False
seriesLow.Name = "Low"
seriesMedium.Name = "Medium"
seriesHigh.Name = "High"
seriesLow.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#B3FFB3")
seriesMedium.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#FFFFB3")
seriesHigh.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#FFA6A6")
seriesLow.Appearance.FillStyle.SecondColor = Drawing.Color.Green
seriesMedium.Appearance.FillStyle.SecondColor = Drawing.Color.Yellow
seriesHigh.Appearance.FillStyle.SecondColor = Drawing.Color.Red
'seriesLow.Appearance.FillStyle.FillType = Styles.FillType.Solid
'seriesMedium.Appearance.FillStyle.FillType = Styles.FillType.Solid
'seriesHigh.Appearance.FillStyle.FillType = Styles.FillType.Solid
Dim seriesBubble As New Telerik.Charting.ChartSeries
chtHeatMap.AddChartSeries(seriesBubble)
seriesBubble.Type = ChartSeriesType.Bubble
seriesBubble.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.Nothing
seriesBubble.Appearance.BubbleSize = 50
seriesBubble.Appearance.PointDimentions.AutoSize = False
seriesBubble.Appearance.PointDimentions.Height = 30
seriesBubble.Appearance.PointDimentions.Width = 30
seriesBubble.Appearance.FillStyle.FillType = Styles.FillType.Gradient
seriesBubble.Appearance.FillStyle.MainColor = System.Drawing.ColorTranslator.FromHtml("#219CEF")
seriesBubble.Appearance.FillStyle.SecondColor = System.Drawing.ColorTranslator.FromHtml("#01467D")
seriesBubble.Appearance.LabelAppearance.Visible = False
seriesBubble.Appearance.Border.Visible = False
Dim lowItem1 As New Telerik.Charting.ChartSeriesItem
seriesLow.AddItem(lowItem1)
lowItem1.XValue = 0
lowItem1.XValue2 = 1
lowItem1.YValue = 1
lowItem1.YValue2 = 0
Dim lowItem2 As New Telerik.Charting.ChartSeriesItem
seriesLow.AddItem(lowItem2)
lowItem2.XValue = 0
lowItem2.XValue2 = 1
lowItem2.YValue = 2
lowItem2.YValue2 = 1
Dim lowItem3 As New Telerik.Charting.ChartSeriesItem
seriesLow.AddItem(lowItem3)
lowItem3.XValue = 1
lowItem3.XValue2 = 2
lowItem3.YValue = 2
lowItem3.YValue2 = 0
Dim mediumItem1 As New Telerik.Charting.ChartSeriesItem
seriesMedium.AddItem(mediumItem1)
mediumItem1.XValue = 0
mediumItem1.XValue2 = 1
mediumItem1.YValue = 3
mediumItem1.YValue2 = 2
Dim mediumItem2 As New Telerik.Charting.ChartSeriesItem
seriesMedium.AddItem(mediumItem2)
mediumItem2.XValue = 1
mediumItem2.XValue2 = 2
mediumItem2.YValue = 2
mediumItem2.YValue2 = 1
Dim mediumItem3 As New Telerik.Charting.ChartSeriesItem
seriesMedium.AddItem(mediumItem3)
mediumItem3.XValue = 2
mediumItem3.XValue2 = 3
mediumItem3.YValue = 3
mediumItem3.YValue2 = 0
Dim highItem1 As New Telerik.Charting.ChartSeriesItem
seriesHigh.AddItem(highItem1)
highItem1.XValue = 1
highItem1.XValue2 = 2
highItem1.YValue = 3
highItem1.YValue2 = 2
Dim highItem2 As New Telerik.Charting.ChartSeriesItem
seriesHigh.AddItem(highItem2)
highItem2.XValue = 2
highItem2.XValue2 = 3
highItem2.YValue = 3
highItem2.YValue2 = 2
Dim highItem3 As New Telerik.Charting.ChartSeriesItem
seriesHigh.AddItem(highItem3)
highItem3.XValue = 2
highItem3.XValue2 = 3
highItem3.YValue = 2
highItem3.YValue2 = 1
SetRating(impact, likelihood, seriesBubble)
Catch ex As Exception
SendError(ex.Message)
End Try
End Sub
The SetRating function passes in the impact and likelihood and sets the Bubble to the corresponding location in the Heatmap.
Our SendError function simply populates the error label:
Thanks to Ves, Telerik's support team, for providing a 2x2 code-in-front example. I have setup this project entirely in code-behind and added more features.
May your dreams be in ASP.NET!
Nannette Thacker
In my previous post, I showed how to create a Visual Studio Solution and Web Site.
In this post, I'll show how to register the Telerik.Web.UI.WebResource within your Visual Studio Project. If you do not own the Telerik RadControls for ASP.NET Ajax collection, please download the free trial.
Create a new Web Form. Right click in your Solution Explorer directory, select to Add New Item, and select a Web Form.
From your Toolbox, select the RadControls. To easily find the control desired, I like to sort the items alphabetically.

Select the RadAjaxManager and drag it onto your form:

This will add code to your form:

Switch to design mode by selecting the Design option at the bottom of the web form screen:

Select the handle on the right of the RadScriptManager and select to "Register Telerik.Web.UI.WebResource.axd"

After completion, you will be notified that the Telerik.Web.UI.WebResource.axd was successfully added to the web.config file.

If you look at the httpHandlers section of your web.config file, you'll notice that it now includes the reference:

And this is now in the handlers section:
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
Next I'll show you had to create a HeatMap using the Telerik RadChart in C# and VB.NET.
May your dreams be in ASP.NET!
Nannette Thacker

A reader has asked me to explain how to create a Visual Studio solution with a Web Site. So in the next 4 posts, I will demonstrate:
1) How to Create a Visual Studio Solution.
2) How to add a RadControl and register the Telerik.Web.UI.WebResource.axd
3) How to create a Heatmap using the Telerik RadChart -- in C#
4) How to create a Heatmap using the Telerik RadChart -- in VB.NET
Creating a project is quite simple. From within Visual Studio, simply select to create a new project. Scroll down to "Other Project Types" and select "Visual Studio Solutions."

Give your project a name and location and select OK. This is where the clickable Visual Studio solution will be saved.
Now we want to create the website to store the project source code.
From the File menu, select to Add and select "New Web Site."

Select an "ASP.NET Web Site." Select the Location on the File System where you wish to have the files located. And select the Language desired.

Select OK. Now your project is created and ready to go!
I told you it was easy! :)
In my next post, I'll show how to register the Telerik.Web.UI.WebResource within the web project.
May your dreams be in ASP.NET!
Nannette Thacker

Are you getting this error? Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
Hopefully this will fix your problem, if it is similar to mine:
Today I was testing the implementation of a simple update command on a new Windows 2008 Web Server I had just setup:
Using con As New SqlConnection(bd.GetConnectionString)
con.Open()
Dim sql As String = _
" UPDATE blah set blah to blah"
Dim cmd As New SqlCommand(sql.ToString, con)
cmd.CommandType = CommandType.Text
cmd.ExecuteNonQuery()
The actual connection string was also very simple using Integrated Security:
add name="myConnectionString" connectionString="Data Source=xx.xx.xx.xx;Initial Catalog=MyDBA;Integrated Security=True"
providerName="System.Data.SqlClient"
But running this update generated the infamous:
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
I had fixed this previously in 2008 when I had the same issue with my Membership Provider, so I suspected the same steps would resolve this problem.
In IIS7 on your Windows 2008 Web Server...
Please go to Application Pools.
Select your web site.
Click "Advanced Settings" in the "Actions" panel.
Under "Process Model" select "Identity."
In the popup, select the "Custom account" radio button.
"Set" the account and password to your dbo account name and password that are used on your SQL Server 2008 database.
Save that.
Under sites, go to your website. In the Features View panel, select "Authentication" under IIS. Under ASP.Net Impersonation, make sure it's Disabled.
May your dreams be in ASP.NET!
Nannette Thacker

I'm in the process of setting up a new Windows 2008 Web Server and realized I'm missing my MS Sharepoint Administration Site.
For those new to this, when you select the MS Sharepoint Administration site, and select the Browse Site option, it takes you to a screen which reveals options for FrontPage Server Extensions 2002 Server Administration. From here you may extend one of your existing sites. As a result of doing this, you now have remote access to publish your code to this server using Visual Studio.
I'm not a website administrator by job role, only by necessity, so I had forgotten how to add the MS Sharepoint Administration to IIS7, so I did a quick Google search and found this great blog post by Robert McMurray:
http://learn.iis.net/page.aspx/134/installing-the-frontpage-server-extensions-on-iis-70/
He also provides a link to details and a download link for FrontPage 2002 Server Extensions for IIS 7.0 installer:
http://www.iis.net/community/default.aspx?tabid=34&g=6&i=1630
http://www.rtr.com/fpse/
May your dreams be in ASP.NET!
Nannette Thacker