Try our conversational search powered by Generative AI!

Find pages that uses a specific block type



I would like to find which pages that use a specific block type and was wondering if there is a plugin built for this available?

Otherwise if someone has some sql query for it?

I want to search in production so thats why i would like a sql query and not do it in code for the sql query case.

EPiServer 7.5 is used.


Oct 10, 2016 14:31

If you go to Admin mode and try to delete the Block Type I recall it will list the contents it's present on. Inspect the namespace of that ASPX and go hunt using a reflection tool. Maybe you can test that page and catch a SQL call using some Profiler as well.

Oct 11, 2016 22:43

Thanks for the answer!

I'm a bit new to EPiServer and I think it would work if the blocktype was not from code as in my example.

I can see the remove button for other types but not for my block that is from code.

Will try remove another type in the meanwhile and see if I can't trace the sql.

Edited, Oct 12, 2016 9:04

I know Dejan Caric wrote a blog about that a while back as well if you are looking for some code :)

Check out

If you just want the SQL you can always listen to the actual SQL using SQL profiling tools or similar. I would probably have solved it in code but that takes a deploy so...

Oct 12, 2016 9:23

Ok thanks!

It doesn't look that hard to solve in code so it's probably the right way to go too :)

Oct 12, 2016 11:42

If you're interesting finding content of a specific content type - how about this SQL Query?

SELECT c.pkID FROM tblContent c INNER JOIN tblContentType ct ON c.fkContentTypeID = ct.pkID WHERE ct.Name = 'NAME-OF-YOUR-CLASS'

You can take c.pkID and add into the url of the episerver edit interface for example

Oct 12, 2016 12:51

Great! thank you!

That helped me achieve what I wanted.

I combined that with the sp editDeletePageCheck and found the references.

Edited, Oct 12, 2016 15:05
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.