tags:

views:

71

answers:

4

I have a specific Content Page (with an existing Master Page) that pretty much just has basic text wrapped with some <p>, <ul>/<li>, <h3>, <h4>, <blockquote> tags...like a blog post.
Is this ok to hardcode all of this html into my content page? Is there a better way (design-wise) to put text into an ASP.NET web page?

+1  A: 

Yes, that's fine. Just make sure that if you're actually using a Content Page (in that it's a child to a Master Page), you keep all your HTML within the ContentPlaceHolders.

orthod0ks
A: 

Look into MasterPages, which will allow you to define a basic template, and then each of your pages will consist of just a content section which you can fill in, thereby foregoing the need to have all that extra template code every single time.

TheTXI
A: 

Traditional HTML is perfectly fine with aspx pages.

You could create a master page (right click the project -> add new item -> select master page). After configuring this page, every time you create a new aspx page select the master page you just created as your masterpage template. Visual Studio will create a basic layout that includes <asp:content> tags. Just put your HTML markup there.

Jonathan Mayhak
A: 

It depends on the objetive of the project... If you think that is going to grow into a big project you should considere using templates :)

Lucas