Click here to Skip to main content
15,905,874 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to add a new webpage through code. Normally we would just right click and select add new item, but i want to know if there's a way that i can just code to add new items.

What I have tried:

The reason why i wanted to know about this is because i'm trying to create a content management system, and it requires to create a new webpage. Since the user does not know how to create it in visual studio 2015, I will need to create a system where the user can create their own webpage via the actual website. Like for example: I wanted to add new webpage called "Test.aspx" in my Pages folder. The question is how can i do it in code? Hope this makes sense.
Posted
Updated 2-Jan-17 20:10pm
Comments
Philippe Mori 3-Jan-17 9:44am    
You would use a database to store information and not create new ASPX files on the server. And when the user ask for a page, you would retrieve the information from the database and generate a page from that using an ASPX page as a template.

And by the way, there are many existing CMS systems so why would you create your own?

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900