Answered by:
Simple Reponse.Write Comment System

Question
-
User-1402564948 posted
Hi
I'm just beginning VB and want to program a simple response.write comment system. I can pull the user name when they are logged in and the comment.
My question:
How can I create a list or array so clients can see the list of comments and who made the comment? Is this called an array?
Imports System.Collections
Imports System.Linq
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.TextBox
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.WebControls.SiteMapPath
Imports System.Web.UI.HtmlControls
Imports System.Xml.Linq
Imports System.Collections.GenericPartial Class response_write
Inherits System.Web.UI.Page
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
Label1.Text = (Me.TextBox1.Text)
Label2.Text = (Membership.GetUser.UserName.ToString)
End Sub
End ClassSunday, August 7, 2011 3:27 PM
Answers
-
User-573138384 posted
Hi, Welcome to ASP.NET world. Here everything is context driven. Every user has his own context. Whatever the logic you have, is for one user. The user whoever logs in, you are displaying his details. If you need all users information, then you can go for data section. You can the save information what user is submitting in any external files or XML or database. If you have less no of users then go for XML, if list is big then save information in DB.
The following articels would be helpful...
XML: http://www.beansoftware.com/ASP.NET-Tutorials/XML-Programming-VB.NET.aspx
Database: http://www.vkinfotek.com/object.html
Once you save the information, you can retrive all users info and display it in asp.net controls. We have rich set of data controls. One of them is
GidView: http://msdn.microsoft.com/en-us/library/fkx0cy6d.aspx
Once you start this application, I bet you are going to learn so many points while saving and retrieving...
All the best!!!
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, August 7, 2011 8:10 PM -
User-578657687 posted
Hi,
The post above is a perfect idea for your requirement.
Also I notice that you have mentiond the membership from you code snippet.
ASP.NET membership give you a built-in way to validate and store user credentials. You can integrate the membership and ASP.NET forms authentication using a series of login controls to build a complete system for authenticating user.
To grasp ASP.NET membership I suggest you to study this tutorial. It's really useful to you:
http://msdn.microsoft.com/en-us/library/879kf95c.aspx
Because the ASP.NET membership need to use database. I recommend you to use database to store the comment and retrieve it using ASP.NET data bound control such as GridView, DataList.
More information about data bound control please check this:
http://msdn.microsoft.com/en-us/library/ms228214.aspx
Conclusion: It can address your requirement using membership, forms authentication, login control and data bound control.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, August 9, 2011 3:19 AM
All replies
-
User-573138384 posted
Hi, Welcome to ASP.NET world. Here everything is context driven. Every user has his own context. Whatever the logic you have, is for one user. The user whoever logs in, you are displaying his details. If you need all users information, then you can go for data section. You can the save information what user is submitting in any external files or XML or database. If you have less no of users then go for XML, if list is big then save information in DB.
The following articels would be helpful...
XML: http://www.beansoftware.com/ASP.NET-Tutorials/XML-Programming-VB.NET.aspx
Database: http://www.vkinfotek.com/object.html
Once you save the information, you can retrive all users info and display it in asp.net controls. We have rich set of data controls. One of them is
GidView: http://msdn.microsoft.com/en-us/library/fkx0cy6d.aspx
Once you start this application, I bet you are going to learn so many points while saving and retrieving...
All the best!!!
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Sunday, August 7, 2011 8:10 PM -
User-578657687 posted
Hi,
The post above is a perfect idea for your requirement.
Also I notice that you have mentiond the membership from you code snippet.
ASP.NET membership give you a built-in way to validate and store user credentials. You can integrate the membership and ASP.NET forms authentication using a series of login controls to build a complete system for authenticating user.
To grasp ASP.NET membership I suggest you to study this tutorial. It's really useful to you:
http://msdn.microsoft.com/en-us/library/879kf95c.aspx
Because the ASP.NET membership need to use database. I recommend you to use database to store the comment and retrieve it using ASP.NET data bound control such as GridView, DataList.
More information about data bound control please check this:
http://msdn.microsoft.com/en-us/library/ms228214.aspx
Conclusion: It can address your requirement using membership, forms authentication, login control and data bound control.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, August 9, 2011 3:19 AM