Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi, I am new to web development, i need to develop a comment box, and save those comments in database , so that i can retrieve them and display them on my web.
My server does not support php or anyother special scriptin, so i believe that i have to code in javascript or asp.net, can anyone please help me with the code for doing this, as to how to implement a comment box and save the comments.
Posted
Updated 9-Nov-11 19:19pm
v2

1 solution

Make a simple Asp webpage

On that page drag one textbox and one button

set Textbox's TextMode property ="MultiLine"

On button click event you'll have to insert the comment in DB
(I'm supposing your DB have a table with two fields id and comment id is autoincrement)

//Open Connection
//Make Command
//Execute the command like this
//Insert into Table values('"+textbox.Text+"')";


You can get help on insertion from
here[^]
 
Share this answer
 
Comments
bkthebest 10-Nov-11 2:43am    
thanks for reply..
but i want make a comment box like facebook myself.
solution you provide is the simple one.
means when user logged in then he can his own posts or comments from others like facebook...
please help
Member 9629966 12-Aug-13 1:12am    
nice code
hansoctantan 10-Nov-11 3:02am    
try textarea instead of textbox
Member 11093128 14-Oct-14 18:35pm    
mm
Syed Salman Raza Zaidi 10-Nov-11 8:14am    
For this you'll have to make a profile page and on that page you'll have to provide a repeater or datalist control to display comments and textbox and button for posting them this is just like orkut's scrap book, i hope you've understand what i want to say :)

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