Groups | Blog | Home
all groups > asp.net > december 2005 >

asp.net : How to display articles in an article list in different ways?


Øyvind Isaksen
12/4/2005 11:02:09 PM
I have 4 articles stored in one category. What I want is to list them out
like this screenshot:

http://www.webmanager.no/screenshot.jpg
(Each article is shown in red box)

The first article shall display the picture in the top, then the article
under this picture.
The 2.nd and 3.rd article need to be displayed side by side, and with the
picture to the right.
Last article shall be shown in the bottom, with no picture.


My question is, what is the best method (datagrid, repeater, place
olders - combinations...?) to make a webpage with this "custom" structure?
If anyone can explain how to to this, or have some code-examples, I will be
very thankful!!!

Steve C. Orr [MVP, MCSD]
12/4/2005 11:46:47 PM
Well I'd probably have each major section be a user control.

If I wanted to use this pattern throughout a web site I might create an
ASP.NET 2.0 master page (or nested master pages) with various content
regions to represent each section.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


[quoted text, click to view]

agapeton NO[at]SPAM gmail.com
12/5/2005 5:49:12 PM
The best way is to study CSS. Most programmers can't even spell CSS.
In my .NET 2.0 course, I make sure that people learn CSS or die trying.


Here are some resources:

My dynamics blog... http://davidbetz.net/dynamicbliss/
My .NET 2.0 course blog... http://davidbetz.net/dotnetcourse/

Then go to the links on that page...

As far as the databinding, I would personally write a server control
and control the data that is filled in by other means. This is how the
information portal I created works. I have a control which takes in
RSS feeds, then creates other controls which does all the magic from
there...all based on CSS, which is the visual language of the web.
Patrick.O.Ige
12/7/2005 2:18:25 PM
Isaksen try looking at a Repeater control at:-
http://samples.gotdotnet.com/quickstart/aspplus/samples/webforms/ctrlref/webctrl/repeater/doc_repeater.aspx
there are other related controls there too you can play with.
Hope thatt helps
Patrick
** IF you have more questions post it.

[quoted text, click to view]

AddThis Social Bookmark Button