Web parts practices

Alex Koshel asked on December 16, 2021 10:10

Hello. I am creating a webpart and as described here I have placed the auxiliary files in a subfolder. Tell me how to get access to them now?

Image Text

Correct Answer

vasu yerramsetti answered on December 19, 2021 06:23

Hi Alex Koshel,

As per my understanding from screenshot, you have used website option while setup your website(Kentico 11 provides two development ways 1. Web Application 2. Website while setup Kentico website). As per Kentico11 Documentation, If your web part consists of multiple files (such as other ASCX controls, images, JS scripts), place these files in a sub‑folder under the directory containing the main web part's files.

So if you want call your RadwareClossaryPageType class file then place into \App_Code with create folder i.e. your sitecode name and place your class.

\App_Code[Folder with your SiteodeName]\RadwareClossaryPageType.cs

Directly you can call your class on your webpart page like below -

RadwareClossaryPageType radwareproperties= new RadwareClossaryPageType();

For better understanding about export folder structure refer this - https://docs.xperience.io/k11/deploying-websites/exporting-and-importing-sites/export-folder-structure

0 votesVote for this answer Unmark Correct answer

Recent Answers


Alex Koshel answered on December 19, 2021 06:52

Thank you

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.