开发者

Preset html files built into program?

开发者 https://www.devze.com 2023-03-22 20:05 出处:网络
I\'m trying to create a very basic web site creator in C#. I already created the templates but have no idea how to get them in the program so the user can pick one and customize it. Is there a certain

I'm trying to create a very basic web site creator in C#. I already created the templates but have no idea how to get them in the program so the user can pick one and customize it. Is there a certain library I should look into? I've bee told this can be eas开发者_如何学Pythonily created in php but I'd rather not go down that route.


If using .NET you can use WebControl controls to display a preview of your templates and make the user decide which one he wants.

Or a list of templates and single WebControl that parse and display the HTML of the current selected list item (template) and then make the user select.

To edit, just a bunch of controls (one for each template placeholder) that updates the view of the WebControl.

In the top link you found how to do it.

P.S. Templates can be stored on XML, Plain Text, DB or any other mean.


Either store the templates as files on the web-side and use them as templates, or store them in a DB. Unless your app is not web-based, in which case the same advice pretty much applies.

0

精彩评论

暂无评论...
验证码 换一张
取 消