1

I am currently developing an ASP.NET WebApp. I am using the .NET framework 4.8.. There I load images from a SQL Server database stored as BLOBs into my project's images directory during runtime. These BLOBs are converted and saved as .jpg files. But now the problem is that the images cannot be displayed in the frontend because they are not included in the project. I wonder now how I can include these images in my project at runtime?

I've already tried the solution here. It doesn't work for me because I can't find an AddItem() function.

Can someone help?

Ali
  • 410
  • 5
  • 21

1 Answers1

0

I've found the solution. You can specify in the csproj file that files in a certain folder should always be imported automatically into the project. For this you open the csproj file (to be found in the project folder) with any editor. There you can insert the following line: <Content Include="path\*.jpg" />. With the extension jpg you can specify, for example, that this rule only applies to jpg files. After that it works fine. Thanks to all who tried to help me.

Ali
  • 410
  • 5
  • 21