Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
1 like 0 dislike
in .Net Framework by 64 69 85

i have create sharepoint project 2019 in Visual Studio 2022 and adding a new UpdatePanel for captcha in login page, but i get the below error when build the project:

`The type or namespace name 'UpdatePanel' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?)`

Also i already have System.Web.Extensions and System.Web.Extensions.Design as recomanded.

The type or namespace name 'updatepanel' does not exist in the namespace

The code:

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <mcc:captchacontrol id="CaptchaControl1" runat="server" height="52px" width=""
           handlerpath="~/CaptchaHandler.ashx" bordercolor="#AFD5C8" borderstyle="Solid" 


1 Answer

0 like 0 dislike
by 64 69 85
Best answer

'UpdatePanel' does not exist in the namespace 'System.Web.UI

To solve this error make sure you have System.Web.Extensions in your web.config under <assemblies> tag:

<add assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Then in my case I solve it by clearing the solution then rebuild it, as the following steps:

1- Right click on the solution in visual studio then Clean Solution.
Clean Solution

2- Again Right click on the solution and Rebuild Solution or Ctrl + Shift + B
Rebuild Solution

If you don’t ask, the answer is always NO!