Dynamically create ASP.NET content pages

  • Is it possible to use ASP.NET to create pages dynamically? That is, I know that we can create content dynamically, but can content pages themselves be created programmatically? I want to give my users the ability to define new pages of content (for example, Categories: Sofas, Tables, Lamps and add / remove as they fit) using the control panel. The resulting content pages must have the correct URL name in order for them to index properly. Example: http://www.example.com/products/Lamps/contentpage.aspx .
  • Is there a demonstration of this somewhere I can view?
+6
c # master-pages
source share
4 answers

Your question is that then people fought a lot, but these days it is much better with several technologies.

ASP.NET MVC to the rescue! At the same time, you can use your friendly URLs for your dynamically created content, so if a user creates a new β€œlamp” in the β€œProducts” category, they will be accessible through http: // yourhost / Products / Lamp

ASP.NET MVC uses .NET Routing to execute these URLs, and you can use it without ASP.NET MVC itself if your project has these restrictions. If you cannot use .NET 3.5, go with another URL processor.

+3
source share

Writing .aspx files to your web folders seems like a serious security risk. If you want users to create their own pages, you may want to store this information in a database and use VirtualPathProvider to serve these files to the ASP.NET engine.

+1
source share

You can use the TextWriter class and create all the pages and code you need. It would be painful, but it would work, although I had never done it before, you might run into some problems since it will not be compiled. you can definitely create html static pages

0
source share

If you want to create your own, it will be a very tedious job. It would be better to buy or use an open source content management system to do the job. There are many on the market that are available to you in both categories. This is the main function of this software package.

Look at www.codeplex.com for some, or there are others to buy as a Telligent or Telerik Sitefinity package.

0
source share

All Articles