More in this section

Forums / Developing with Sitefinity / Is there an easy way to swap user controls via a sql script

Is there an easy way to swap user controls via a sql script

2 posts, 0 answered
  1. Anthony Smith
    Anthony Smith avatar
    34 posts
    Registered:
    08 Dec 2009
    07 Jan 2010
    Link to this post
    Is there an easy way to swap user controls via a sql script e.g. say i've got a control a which i've added to 10 pages.

    But then say that i had a new version of that control but i wanted to upgrade it but maintain the orgional, is there a script i can run to change all existing instances and swap them for this new control easily?

    Thanks
    Anthony
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    07 Jan 2010
    Link to this post
    Hello Anthony Smith,

    Here are two options

    1. Modify the initial control so that the changes will apply to all pages where you have dropped the control.

    2. Loop through controls collection of the pages and made desired changes dynamically.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered