+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Search Custom Control across multiple pages

Search Custom Control across multiple pages

3 posts, 1 answered
  1. Lalit
    Lalit avatar
    9 posts
    Registered:
    01 Jul 2013
    20 Nov 2013
    Link to this post
    We have few controls that are developed long back and i am not sure they are used anywhere in the pages (many pages to search manually), is there a better way to search a .ascx control in which pages it's been used? Is there a better way to make a control obsolete without impacting the page? Please advise.
  2. Strahil Strahilov
    Strahil Strahilov avatar
    24 posts
    Registered:
    06 Nov 2014
    22 Nov 2013
    Link to this post
    Hi Lalit,

    Thank you for contacting Siteifnity support.
    First search these user controls in your solution and check if they are used in your custom widgets or master pages. If these ascx-s are Sitefiniity widgets can search for them in the database is [sf_object_data] table. There you can select all the rows where you control is used like this:
    SELECT *
      FROM [YourSitefinityDataBase].[dbo].[sf_object_data]
      where object_type = '<put the full type name of your control. Ex: Telerik.Sitefinity.Web.UI.PublicControls.LoginWidget>'

    Regards,
    Strahil Strahilov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Lalit
    Lalit avatar
    9 posts
    Registered:
    01 Jul 2013
    27 Nov 2013 in reply to Strahil Strahilov
    Link to this post
    Thanks for the reply Strahil, it was very helpful.
     Below query gives all the pages

    SELECT *      
      FROM [YourSitefinityDataBase].[dbo].[sf_page_data]
      where content_id IN (SELECT distinct page_id  FROM [YourSitefinityDataBase].[dbo].[sf_object_data]
      WHERE object_type = '<put the full type name of your control. Ex:Telerik.Sitefinity.Web.UI.PublicControls.LoginWidget>' 
      and page_id IS NOT NULL)
3 posts, 1 answered