Jason94
Jason94

Reputation: 13610

How can I add namespaces to my asp.net page?

I've just added Ajax Control Toolkit with NuGet, and I want to add the following piechart:

       <ajaxToolkit:PieChart ID="pieChart1" runat="server" ChartHeight="300" 
            ChartWidth="450" ChartTitle="Widget Production in the world" 
            ChartTitleColor="#0E426C"> 
            <PieChartValues>
                <ajaxToolkit:PieChartValue Category="United States" Data="45" 
                PieChartValueColor="#6C1E83" PieChartValueStrokeColor="black" />
                <ajaxToolkit:PieChartValue Category="Europe" Data="25" 
                PieChartValueColor="#D08AD9" PieChartValueStrokeColor="black" />
                <ajaxToolkit:PieChartValue Category="Asia" Data="17" 
                PieChartValueColor="#6586A7" PieChartValueStrokeColor="black" />
                <ajaxToolkit:PieChartValue Category="Australia" Data="13" 
                PieChartValueColor="#0E426C" PieChartValueStrokeColor="black" />
            </PieChartValues>
        </ajaxToolkit:PieChart>

However, my page has no clue what PieChart is, how can I add ajaxToolkit and link it to the dll file in the aspx page?

Upvotes: 0

Views: 1800

Answers (2)

backtrack
backtrack

Reputation: 8144

I hope the following images will be useful. And download the needed AJAX .dll file.

Add this:

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

Step 1:

Step 1

Step 2:

Step 2

Step 3:

Step 3

Step 4:

Step 4

Upvotes: 0

Louis van Tonder
Louis van Tonder

Reputation: 3710

Mine looks like this:

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

If you drop an ajax control onto the form, it should create the registration for you. Mine above is an auto generated reference to the ajax toolkit. You also have to add a reference to the Ajax dll through the project references (although Nuget might have done this already, not sure).

Upvotes: 1

Related Questions