Emad-ud-deen
Emad-ud-deen

Reputation: 4874

Adding Ajax toolkit to web.config so it can be used throughout a project

I would like to add the following to Web.config so the Ajax toolkit is available to my whole project because this is part of a tutorial I'm following from an ebook.

<pages theme="Blue">
  <controls>
⋮
    <add tagPrefix="atk" namespace="AjaxControlToolkit"
        assembly="AjaxControlToolkit" />
  </controls>
</pages>

In our Web.config file there is no controls tag so I tried to add the controls tag and get an error telling me it is expecting child element controls. I'm assuming these child element controls are indicated by ⋮ in the ebook.

Can you tell me what child element controls need to be added so I can add the tagPrefix?

Upvotes: 0

Views: 3564

Answers (1)

Scott Selby
Scott Selby

Reputation: 9580

Ok, I changed this answer because your code looks just fine , assuming you have page and control in <system.web> , also have you added AjaxControlToolkit in your bin folder?

<system.web>
<pages>
  <controls>
    <add assembly="Subtext.Web.Controls"
            namespace="Subtext.Web.Controls"
            tagPrefix="st" />
    <add src="~/Controls/SomeControl.ascx"
            tagName="SomeControl"
            tagPrefix="st" />
  </controls>
</pages>

Upvotes: 1

Related Questions