Alright, i finally figured what u need. Have u used Nested Gridview
https://www.google.co.in/search?q=nested+repeater+control+in+asp.net&oq=Nested+rep&aqs=chrome.3.69i57j0j69i65j0l3.6249j0j1&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8#es_sm=93&espv=210&q=nested+gridview+in+asp.net ?[Check out suresh's blogspot]
You can achieve to show comments and replies using Nested Gridview.
Parent Gridview will show existing comments. Put 'Reply' anchor (<a>) tag below div in gridview.
So, whenever any user click on Reply button, show child Gridview using javascript.(Please see Code 1 below).
In Child Gridview, show all replies for that comment, if any.
You can use textArea to input User's Reply. and a 'Submit Reply' Button to save reply.
Tip: On 'Submit Reply' click use javascript to store Comment's unique ID and reply in a Hiddenfield.
On Server Side, you can access reply and By Comment ID u could figure out for which comment user has submitted that reply!
Show Comments and Replies in descending order(based on TimeStamp) just as in link u just provided.
I hope u'll understand, what and how we can work like this.
U need to first draw a sketch, or a flow of process Perhaps, in ur mind or a Notepad in order to get confidence how it's gonna work and what can be challenges.
Draw a small dummy nested Gridview first on a Test Page.
Code 1 to show hide div in child Gridview:
function divexpandcollapse(divname) {
var div = document.getElementById(divname);
if (div.style.display == "none") {
div.style.display = "inline";
} else {
div.style.display = "none";
}
}
http://hashtagakash.wordpress.com/
Timmack, if this helps please login to Mark As Answer. | Alert Moderator