Importing objects to webapplication project type

Vadlamani . asked on September 21, 2020 13:39

Hello, I tried importing the webpart which was developed in website project (Kentico12), ended up in error in code behind file.

Could you help us on how to import the file developed in website.

I am using Webapplication.

Correct Answer

Juraj Ondrus answered on September 22, 2020 07:37

I just copied some ASCX and CS web part files from my web site project to the web application project. Then I included those files into the solution using VS2019 and then selected the file and I can see the option to convert to web application in the Project menu, as shown in this screen shot.

0 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on September 21, 2020 13:51

What is the error?

Where are you getting the error?

How did you import the Web Part?

0 votesVote for this answer Mark as a Correct answer

Vadlamani . answered on September 21, 2020 14:16

We imported using the "import sites or objects" button under Sites. Also checked the option to get the code files too. Import was successful , but asked us to follow few steps in the link. Which asked us to convert to webapplication , but we didnot find it our solution/project properties.

error: unable to find control repitems in .cs file. Repeater id is repitems.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on September 22, 2020 04:47

Have you tried adding/including the file into the web app project in Visual studio first? I mean, using the "Show all files" button in the solution explorer and then include the imported file into the web app project? After this you might be able to convert it to web app format.

0 votesVote for this answer Mark as a Correct answer

Vadlamani . answered on September 22, 2020 05:40

Hello Juraj, I did that step to include it in the project, but I didn't find option to convert to web application. Could to help to proceed further.

0 votesVote for this answer Mark as a Correct answer

Vadlamani . answered on September 24, 2020 07:15

Thank you Juraj... I am able to import and use the webport imported.

0 votesVote for this answer Mark as a Correct answer

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