Search Custom Control across multiple pages

Posted by Community Admin on 04-Aug-2018 21:17

Search Custom Control across multiple pages

All Replies

Posted by Community Admin on 20-Nov-2013 00:00

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.

Posted by Community Admin on 22-Nov-2013 00:00

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

Posted by Community Admin on 27-Nov-2013 00:00

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)

This thread is closed