Prisoner
Prisoner

Reputation: 27628

What would be involved in creating a template system in C#

I'm creating a project in C# and I want to be able to define "template" files that define the layout that will be produced in an ASP web page. This means from an interface people are able to click certain "areas" and add text, images or a video.

I can only think of using the coordinates to achieve this. Any better ways? Any tips would be good.

Upvotes: 0

Views: 125

Answers (3)

IrishChieftain
IrishChieftain

Reputation: 15253

I'd pre-define a set of user controls to provide different layout and/or DB access options. I'd style them with CSS and steer clear of XSLT for this particular task.

You could then dynamically load these user controls into the content placeholders defined in master page(s). You don't need to implement Web Parts in order to add content - just create separate admin to add text/images to these areas.

Upvotes: 1

Cylon Cat
Cylon Cat

Reputation: 7211

Are you looking for user-editable templates? Then you want to look at Web Parts. (Web Parts are probably more often associated with SharePoint, but they do exist in ASP.NET without SharePoint.)

Upvotes: 1

Davide Piras
Davide Piras

Reputation: 44605

have a look at MasterPages in ASP.NET, it's exactly what you are looking for, content regions to be editable in pages associated with the main masterpage.

Upvotes: 3

Related Questions