locked
How to correct the web config file inorder to add ajax calendar in content page? RRS feed

  • Question

  • User-393411591 posted

    How to modify this piece of code in web config ? it gives runtime error since i didnt merge them.

     <pages>
          <namespaces>
            <add namespace="System.Web.Optimization" />
          </namespaces>
          <controls>
            <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
          </controls>
        </pages>
    
    
         <pages>
          <controls>
            <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
    PublicKeyToken=31BF3856AD364E35" /> <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="asp" /> </controls> </pages>

    Also how to find out Publickey token? I tried sn.exe -T System.Web.UI.dll  in command prompt but it shows sn command is invalid.

    Friday, May 1, 2015 1:44 AM

Answers

  • User1711366110 posted

    How to modify this piece of code in web config ? it gives runtime error since i didnt merge them

       As per this case, you can replace the following code :

    <pages>
          <namespaces>
            <add namespace="System.Web.Optimization" />
          </namespaces>
          <controls>
            <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
    
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="asp" /> </controls> </pages>

    If still not working ,then remove the referenced ajax dll from your application ,then add it again by add reference method. then re-build your application then check it on web.config file.

    Click here to know more about Different ways to add AjaxControlToolkit in Asp .Net Website

    --
    with regards,
    Edwin

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 4, 2015 1:56 AM