This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
hi, In my project, i have given a option to user to enter their comments.
In one page i gave one text box and submit button(say usercomment page).After clicking the submit button the user commment gets added in the database.After adding the usercomment in the database i redirect the page to usercommnetPage (contains the textbox and submit button). In the usercomment page itself i want to display the user's comment. I tried by taking the comment stored in the database,it is getting displayed but the recently added comment gets displayed after refreshing the page.
I tried to refresh the page by adding meta tag the disadvantage is every n number of seconds the page is getting refreshed.
Is there any other way to display the recently added comment without refreshing the page manually?can anyone help me in this?
Instead of taking the comment from database what probably you can do is setting the comment into the session. Once you are done with the databse insertion successfully and redirected back to the usercomments page then you can retrive the latest comment from session and display it.
Joined: Aug 16, 2005
hi thanks for your reply. Sorry,i forget to mention this in my question. I want to display all the comments entered by that user and also the recent comment. By using session object i am able to retreive the recent and the last comment only.but i want to display all the comments entered by the particular user.