Link to home
Start Free TrialLog in
Avatar of ltdanp21
ltdanp21

asked on

Password Protecting Some Text and Not Others

Hello everyone,

I have a very simple website that looks like this:

When a user clicks on a link, the link loads a user control and has a parameter that tells the user control what text it should get from the WebPages table of the database. Some of the text needs to be password protected (accessible to only a few users) and the rest can be accessible to anyone.

I plan to add a “Security” column to the WebPages table that indicates whether the page is password protected (1) or not (0). Whenever the user control loads a new page it’ll check if the “Security” column contains a 1 or a 0. If it contains a 1, the user control will check to make sure the user is logged in by looking for a cookie. If no cookie is present, it’ll redirect that user to the login page.

Is this the most efficient way to go about this or is there a more efficient or easier way?

I'm new to .NET programming so please make your response fairly detailed.

Thank you,

Daniel
SOLUTION
Avatar of cybertopia
cybertopia

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial