user84786
user84786

Reputation: 631

Facebook Wall functionality using ASP.Net

I want to create something similiar to a facebook wall on my social site. I want to store the posts in an sql database and that should be rather simple. What I am looking for is a good way to display the posts? I guess I don't even really know where to start, as I can only think of using a loop to display asp:textboxes. Which obviously is not correct.

I want there to be multiple posts displayed on the page, which should include:

I really have no idea of how to implement this concept, so any ideas would help greatly.

Upvotes: 3

Views: 4382

Answers (3)

JoshJordan
JoshJordan

Reputation: 12975

To get started, view this article from asp.net on the Repeater control, or this great article.

The Repeater control lets you databind to a list of objects, and then define one template for how that object should be displayed. Then, ASP.NET will handle showing it as many times as necessary. You can write the code-behind for dealing with delete and edit as if there were only one instance on the page.

Upvotes: 2

Raj
Raj

Reputation: 6830

go ahead with jquery, use a lot of ajax. for the mark up, use a repeater control with all clean html mark up (instead of server side controls which would generate a lot of unnecessary mark up quickly creating performance issues)

only populate x number of items on initial load, and then using jquery pull data as required based on user action. you can serve this data via json, decode json on client side using jquery and perform a loop which converts this json into appropriate html and injects it into the correct html element

should be simple ;-)

Upvotes: 1

swilliams
swilliams

Reputation: 48930

ASP.NET gives you lots of ways to do this. A Repeater, DataGrid, GridView are the first that come to mind. If you'd rather use ASP.NET MVC, there's always the good old foreach loop.

Additionally, check out ListView too.

Upvotes: 0

Related Questions