Preface: ASP. NET 2.0 applications cannot reference ASP. NET Ajax controls by default. to reference ASP. NET Ajax controls, you must configure web. config
Reference: ASP. NET Ajax programming Volume I-configure ASP. NET Ajax http://book.csdn.net/bookfiles/326/10032613138.shtml
Procedure:
1. Add referenceA. System. web. extensions. DLL (C:/program files/Microsoft ASP. net/asp. NET 2.0 Ajax extensions/v.1.0.61025) B. Microsoft. web. preview. DLL (C:/program files/Microsoft ASP. net/asp. NET 2.0 Ajax futures January CTP/v.1.0.61025) to reference the control in the ajaxcontroltoolkit, you must also reference the ajaxcontroltoolkit. DLL
2. Configure the Web. config componentWeb. config is an XML document. Its root element is <configuration> <! -- Configure Asp.net Ajax webconfig ___ 1 --> <! -- This node must appear as the first <configuration> node --> <configsections> <sectiongroup name = "system. web. extensions "type =" system. web. configuration. systemwebextensionssectiongroup, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "> <sectiongroup name =" scripting "type =" system. web. configuration. scriptingsectiongroup, system. web. extensions, version = 1.0.61025.0, culture = neutral, Publickeytoken = 31bf3856ad364e35 "> <! -- If you want ASP.. Net Ajax applications can compress or cache client script files during runtime, define a new <section> as shown below in <sectiongroup name = "scripting> --> <section name =" scriptresourcehandler "type =" system. web. configuration. scriptingscriptresourcehandlersection, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "requirepermission =" false "allowdefinition =" machinetoapplication "/> <sectiongroup name =" WebService S "type =" system. web. configuration. scriptingwebservicessectiongroup, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "> <section name =" jsonserialization "type =" system. web. configuration. scriptingjsonserializationsection, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "requirepermission =" false "allowdefinition =" Everywhere "/> <section name =" profileservice "type =" system. web. configuration. scriptingprofileservicesection, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = token "requirepermission =" false "allowdefinition =" machinetoapplication "/> <section name =" authenticationservice "type =" system. web. configuration. scriptingauthenticationservicesection, system. web. extensions, Version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "requirepermission =" false "allowdefinition =" machinetoapplication "/> </sectiongroup> </configsections> <! -- Configure Asp.net Ajax webconfig ___ 2 --> <! -This node appears as a sub-node of <configuration> --> <system. Web. Extensions> <scripting> <WebServices> </WebServices> <! -- The following statement compresses the size of the client script library when the program runs in release mode. If not, we should definitely add this HTTP module to improve network transmission speed --> <scriptresourcehandler enablecompression = "true" enablecaching = "true"/> </scripting> </system. web. extensions> <! -- Configure Asp.net Ajax webconfig ___ 3 --> <! -- In the <configuration> root element, <system. register ASP. net Ajax server-side control prefix --> <pages> <controls> <add tagprefix = "asp" namespace = "system. web. ui "assembly =" system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/> <add tagprefix =" asp "namespace =" Microsoft. web. preview. ui "assembly =" Microsoft. web. preview "/> <add tagprefix =" asp "namespace =" Microsoft. web. preview. UI. controls "assembly = "Microsoft. web. preview "/> </controls> </pages> <compilation DEBUG =" true "> <assemblies> <add Assembly =" system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/> <add Assembly =" system. design, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a "/> <add Assembly =" system. web. extensions. design, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf38 56ad364e35 "/> </assemblies> <! -- Configure Asp.net Ajax webconfig ___ 4 --> <! -- Modify the <compilation> section to allow debugging and add necessary assembly for debugging --> <! -- The above Code also contains the <buildproviders> and the declaration of the *. asbx file. If the application does not require a remote web service bridge on the server side, you do not need to add this part of content in <buildproviders> --> <! -- The following section is newly added --> <buildproviders> <add extension = "*. asbx "type =" Microsoft. web. preview. services. bridgebuildprovider "/> </buildproviders> </compilation> <! -- Configure Asp.net Ajax webconfig ___ 5 --> Add or modify the Go to: http://hi.baidu.com/michael8119/blog/item/bd5a319077757c8ea977a4b1.html