You will get this error if the below assembly reference is missing in the web.config file when you add an asp.net script manager to the page.Add this to the assembly section of the web.config file.
<add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>