• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Week: 3 At a Glance > Answers for Day 14, “Advanced Components: User Logins”

Answers for Day 14, “Advanced Components: User Logins”

1: How can you use a Show Region behavior to hide information?
A1: The Show Region server behavior can be used to hide information if it is keyed on the inverse of a query that should show it. For example, if you want a region to be hidden when a recordset isn't empty, you should define a Show Region behavior that is activated when the recordset is empty.
2: What are login systems used to secure?
A2: Login systems typically are used for two purposes—allowing access to a secured area of a Web site and giving special access based on a user account. The former method doesn't care who the user is—just that the user has the proper information to access certain pages on the Web server. The later technique opens up portions of the site based on the user's identity, not just whether or not she has a valid username and password.
3: How can you protect pages from being viewed without a valid username or password?
A3: Use the Show Region behavior to hide the contents of an entire page based on a recordset that determines whether a login/password is valid. If you forget to hide the pages that are supposed to be password protected, all a potential hacker needs to do is guess the URL of a page that is past your login screen, and he'll have access to your site!
4: What does the Go To Related Page behavior do?
A4: The Go To Related Page behavior is used to create a link to another page that will pass all the existing URL parameters and/or form elements to a subsequent page. You need this for maintaining session information without session variables.
5: Are recordset variables passed by the Go To Related Page behavior?
A5: Absolutely not! The contents of a recordset must be generated each time a page is visited. You can, of course, manually transfer a recordset value through the URL or a hidden form field, but this is not automatic!
6: If a user cannot navigate through a session variable-based site, what is the likely cause?
A6: If a user is having trouble accessing a Web page that uses session variables, chances are the user is not allowing cookies to be set on his computer. A cookie containing the user's session ID (as determined automatically by the application server) is needed to retrieve session variables. the user should enable cookies and give it another go.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint