Last post Jan 09, 2017 08:26 AM by Eric Du
Jan 07, 2017 02:56 AM|BerGEX|LINK
Hello, I am trying to make a simple social network for my school project but I am not really understanding how the profile page works. should I create a different page for every user? (or automatically). And then update it when someone adds or deletes a
new photo or status? or should I connect everything with database?
so any other suggestions how this can be done? I prefer to do first more. but still not sure if it can be done
Jan 07, 2017 12:41 PM|PatriceSc|LINK
Data are never "stored" right inside a web page. The page defines the general layout and behavior. Data are retrieved from some storage and added to some places inside this page. You can even expose the same page at a distinct location for each user but
all those locations are "routed" to a single page.
See https://www.asp.net/web-forms to get an idea about how it works...
Edit: you can still avoid using a db at least to start with, the point is that data are not "stored" inside the page that is showing them but separately...
Jan 09, 2017 08:26 AM|Eric Du|LINK
Webform is a B/S structure, it runs in the server side, you could though operate in the page(like submit form, insert data to database), then send request to server side(IIS), after server side finished it, it will return a response message to browser.
Also it provides more encapsulated controls for you to use, you can drag it to page(Page.aspx), then add event and logical code in code behind(Page.aspx.cs).
For more detail, please refer to this link:
You don't need create a different page for every user, you only need create one page, show the layout and controllers, then get the different person data from the database, show data in the page. Actually, all operations are the delete, add, update and select
to data. I found a tutorial about how to operate it, please refer to this link:
Step By Step Select, Insert, Update and Delete using ASP.NET C# and ADO.NET: