Reputation: 2617
I am new to .NET framework and I want to create a profile page for each user to edit their own page. How do I make this edit page only available to the specific user? Is there a way to do this without me manually going into the code every time I have a new user sign up?
Upvotes: 1
Views: 499
Reputation: 67193
You start by ensuring that the page is only visible to authenticated users. You do this by setting the appropriate settings in web.config for the corresponding folder or file.
Once you've done that, this page should simply load details for the current user. All users would see the same page, but it's content would be populated by your code only for this current user.
There would therefore be no way for one user to display the contents for another user. The ID of the user being viewed/edited should definitely not be a query argument or anything like that.
Upvotes: 1
Reputation: 5447
I'd take a look at ASP .NET Membership. Then you can lookup the user "profile" based on their Id to load the appropriate information.
Upvotes: 2