質問

I am upgrading sharepoint 2010 solution webpart to 2013.

Foll. is the procedure I follow:-

  1. Edit your .csproj file and add to it -> 15.0
  2. Go to project properties and set framework as 4.5
  3. Go to package and under properties of the package set the version to 15.0
  4. Do a find replace for 14.0.0.0 to 15.0.0.0.
  5. Check each file to do a check for any hive references. You'll need to add a /15/ to these. EG: _layouts/ to _layouts/15/ and also for CONTROLTEMPLATES as CONTROLTEMPLATES/15
  6. Download AJAX version 4.5 and update reference of AJAX dll in project
  7. NO Change have been done to master page
  8. Do right click on project and Click Clean to clean solution
  9. Build the solution, then Deploy your solution

When I add a webpart to a site page it gives error as:-

The requested script resource 'MaskedEdit.MaskedEditValidator.js' requires version 'AjaxControlToolkit, Version=4.5.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' of the ASP.NET AJAX Framework. To use this resource, make sure that the application references version 'AjaxControlToolkit, Version=4.5.7.1213, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e'.

The error goes away if I remove the foll. line from code, however, only the images on webpart are visible and I can no longer edit this page (option dissapears, appears only when I remove webpart using ?contents=1):-

  <cc1:MaskedEditExtender TargetControlID="txtBookingStart" Mask="99/99/9999" MaskType="Date" runat="server" ID="MaskedEditExtender_txtBookingStart">
                                    </cc1:MaskedEditExtender>
                                    <cc1:MaskedEditValidator runat="server" ID="MaskedEditValidator_txtBookingStart" ControlExtender="MaskedEditExtender_txtBookingStart" ControlToValidate="txtBookingStart" InvalidValueMessage="Invalid booking start date" Display="None">
                                    </cc1:MaskedEditValidator>

Any idea what is happening?

役に立ちましたか?

解決

I have reverted back to AJAX version 3.0.30930.28736 and it all works well! Looks like newer versions of AJAX donot work with SP2013 as well just like they caused issued in SP2010!

However, this MSDN forum does say that we can use 4.5.. http://social.technet.microsoft.com/Forums/sharepoint/en-US/60fa19fe-86a0-446b-b61f-11a82fe4287f/how-to-implement-ajax-toolkit-for-sharepoint2013?forum=sharepointdevelopment&prof=required

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top