Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hi Team ,

I am developing Internal Forum Module for my web application . In My web application there are two roles adminUser and User . User Can Post Query we save it in table . User When logs in Sees the Query and replies that particular Queries of users. Again user Can reply and So On . I Wanted to Store the Conversation as First User replied , admin reply etc Just like the forums but my Concern is how should i save in Table Column ?

example , if User Sends the Query -- Unable to login as Subject , then Admin replies - With any Solution , User Replies --- Thanks for Solution

I want the This Conversation in a TextBox area like Below

User - Unable to login
Admin - With any Solution
User -- Thanks for the Solution

Please let me know how to save in table and Fetch as above format and bind to the textbox
Posted

1 solution

First of all, this question has nothing to do ASP.Net or MVC for that matter.

And before I go on to answer this question, may I ask "What have you tried so far?". This is quite basic construction and instead of asking on forum like CodeProject, you better discuss with your colleagues or even your boss. That way not only you would be in a better position to discuss this quicker but your colleagues can give you input much faster than you would get on this forum.

Anyway, if I understand correctly you want to maintain a chain of conversion in the forum.

You can start with a very simple structure like this:

SQL
Posts:

	Id,
	Title,
	Content


SQL
Replies:
	
	Id,
	PostId,		//Id column in the Posts table
	ReplyTo,	//Id column in the Reply table. If this is the direct reply to Post, it remains null.
	Content


Hope this help to start.
 
Share this answer
 
Comments
DamithSL 10-Nov-14 14:31pm    
5wd, I would store date time too :)
Manas Bhardwaj 10-Nov-14 14:33pm    
Thanks!

Yes, and the user name? ;)
DamithSL 10-Nov-14 14:41pm    
Yeh user id :) Ok Ok.. that's enough for simple forum

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