开发者

how to upgrade code to a new version of third party control

I have a web application in asp.net 3.5 where i have been using some third party controls i.e. Devexpresv9.2 and on the pages where i am using these controls i normally has to call the register tag on the page markup like for ex:

<%@ Register Assembly="DevExpress.Web.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dxcb" %> <%@ Register Assembly="DevExpress.Web.ASPxG开发者_StackOverflow社区ridView.v9.2.Export, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dxwgv" %>

Now i have updated the version of devexpress controls installed on my machine and it has stopped working because the version installed on my machine is v10.0 but my code is looking for v9.2

Please advise how can i modify my code in such a way that in future if i install another version then i don't have to modify all the pages and references again. May be something in web.config that can help me or anything generic??

Thanks


Use the project converter which is designed for this. It is located under the Windows Start Menu at "Develper Express V2010 vol1 -> Components -> Tools -> Project Converter". This will automatically change all of your references to the current version.

Project Converter Documentation


I think you answered your own question. You don't need to add the assembly reference on each page, put it in web.config.

<system.web>
  <compilation>
    <assemblies>
      <add assembly="DevExpress.Web.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
      <add assembly="DevExpress.Web.ASPxGridView.v9.2.Export, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
    </assemblies>
  </compilation>
  <pages>
    <controls>
      <add namespace="DevExpress.Web.ASPxCallback" assembly="DevExpress.Web.v9.2" tagprefix="dxcb">
      <add namespace="DevExpress.Web.ASPxGridView.Export" assembly="DevExpress.Web.ASPxGridView.v9.2.Export" tagprefix="dxwgv">
    </controls>
  </pages>
</system.web>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜