0

I'm trying to create a portfolio website where students can log in, choose from a selection of templates and then edit the content.

The users page is already set up but contains no html or asp.net. I want to have it so that when the user selects the template and clicks the button, the code from that template is then written into their page.

Any ideas how I could do this?

1

1 Answer 1

1

Creating physical pages is not a good idea.

What you rather can do is to have your "pages" in the database and expose them through a url facade built on url rewriting.

A simplest example would be - you have a table, PAGES with Name and Body. Pages can be accessed with ShowPage.aspx?page=PageName. However, a facade exposes them as Pages/PageName.aspx which is internally rewritten into the ShowPage.aspx?page=PageName.

It doesn't really matter if you code agains WebForms or MVC, the general idea remains the same.

Sign up to request clarification or add additional context in comments.

3 Comments

But how would I get the write the html/asp from the selected template so that the users personal page then has that code as well?
Tons of options. Dynamic pages can be created from manually crafted HTML, you can even expose a web HTML editor or you can dynamically create data from other tables.
How would I do it using a table in a database?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.