1. You use onitemdatabound to set the id in your ViewState. OnItemDataBound fires for each record. Therefore, ViewState will always contain the Id of the last task in the list.
2. From your insert query, it seems you are using an identity column in your database for the id of the task. Can you check if it is actually filled in the database?
3. Because if it is not filled correctly, or all tasks get the same id, then all replies will also get the same if, and the join will return all replies for all tasks.
So first check to see if the data in the database is actually correct (all tasks have a unique id, and all replies actually have the right task id stored with them). I have a strong feeling, based on the observations above, that your PK and FK fields are not filled correctly.
UPDATE: Check your select query for the replies:
select task.id ,rply.name,rply.comment,rply.rpl_date from task join rply on task.id=rply.id where task.id=rply.id ORDER BY task.id DESC
How does that query limit the results at all. It will give you all replies for all tasks.
If you move the sqldatasource2 inside the itemtemplate of the outer listview, you can use a control parameter pointing to id_Label to filter the replies to one task.