query1
reply 1 reply 2
your reply with button and textbox option
query 2
reply 1 reply 2
*your reply with button and textbox option*
query 3
reply 1 reply 2 reply 3
*your reply with button and textbox option*
reply 1 reply 2
your reply with button and textbox option
reply 1 reply 2
*your reply with button and textbox option*
reply 1 reply 2 reply 3
*your reply with button and textbox option*
Hi — here is a clear, practical pattern you can follow so each question shows its comments and lets a user reply inline. Use a parent/child schema (Queries, Replies). In ASP.NET Web Forms bind the parent list with a ListView/Repeater; inside each item render the child replies (a nested Repeater or ListView). Put an input and submit control in the item template and send the parent id to the server (for example via CommandArgument). If you are on MVC, render replies with a partial view and post to an action that accepts the query id.
A minimal server-side flow in Web Forms looks like this: bind queries -> for each item bind its replies -> when the reply button is clicked, grab the parent id and the input text, insert the reply, then rebind the single parent item or the whole list. Example handler:
protected void QueriesList_ItemCommand(object sender, RepeaterCommandEventArgs e)
{
if (e.CommandName == "PostReply")
{
int qid = Convert.ToInt32(e.CommandArgument);
var txt = (TextBox)e.Item.FindControl("ReplyTextBox");
string reply = txt.Text.Trim();
// Insert reply using parameterized SQL or ORM, then rebind
BindQueries();
}
} Notes and cautions: always use parameterized queries or an ORM to prevent SQL injection; HTML-encode reply text when rendering to avoid XSS; prefer AJAX/UpdatePanel or client-side calls to avoid full postbacks; add paging or lazy load replies if a query gets many comments. — good call asking for clarification: please say whether you are using Web Forms or MVC and paste your DB schema or current control markup so we can give a targeted snippet.
Jump to Post— JorgeM 958Can you clarify what it is you posted? What help do you need? What isn't working?
so that able to reply along with query
Can you clarify what it is you posted? What help do you need? What isn't working?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.