Click here to Skip to main content
15,443,778 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello everyone!

I just want to know how can I create a post-reply style in ASP.Net similar to Facebook moreover somewhat like CodeProject Discussions.
I want to know which controls to use for it. Also, how do I store them in the Database? i.e. in what style so that I can retrieve them on Pageload alongwith the username, date and time, also the question number.

Please give some hint / advice / clue. . . . . Don't want the in-detail explanation. Only some points.

Thanks in advance!!
Updated 13-Dec-11 19:35pm

1 solution

It can be done using Jquery
<script type="text/javascript">
       $(function () {
           $("#Button6").click(function (evt) {


<asp:button id="Button6" runat="server" text="Add Comments" xmlns:asp="#unknown" />
<asp:panel id="Panel1" runat="server" height="120px" width="723px" cssclass="panel" xmlns:asp="#unknown">
        <br />
        <asp:textbox id="TextBox2" runat="server" height="57px" width="719px"></asp:textbox>
        <br />
        <br />
        <asp:button id="Button4" runat="server" text="Submit" height="25px">
            Width="95px" onClick="onsubmit" />
        <asp:button id="Button5" runat="server" height="25px" text="Cancel">
            Width="88px" />

take a datalist for show reply data.
after reply bind datalist again to make changes.(means in onsubmit button click.)
Share this answer
Tech Code Freak 14-Dec-11 3:11am     CRLF
Thanks for the reply! Please tell how to display/adjust the post and replies one below the other in a style similar to that in facebook.. i.e. like in CP Discussions page---One post>>then below it comes its reply which has an indent then another reply to this reply which also is indented. Like a staircase.. Or like in this page--reply-comment format display style. Currently used DataList but getting all posts/comments as a list with no Post-Comment style. Please guide regarding the controls to use and how to go for it. I have made my DB table which has columns Id,UserId,PostHeader,PostBody,PostDate,ReferencePost(allow nulls--if null then post else comment--if foreign key to same table's Id column).
uspatel 15-Dec-11 23:54pm     CRLF
see article as
Tech Code Freak 17-Dec-11 6:10am     CRLF
Not pretty helpful for me. Don't know how to run ASP. Should I use a DataList within a Repeater? If yes, how to code the DataList inside the Repeater? If no, then what the heck should I do???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900