Controlling Browser History
It has been said that he who controls history, controls the future. That is certainly true when using a browser. Everyone is familiar with the browser Forward and Back buttons, which allow the user to navigate back and forth amongst the pages already visited in the current session. Forward and Back are central to the browsing experience. The browser automatically enables and disables these buttons as necessary, if there are appropriate pages to navigate to. For example, if you are at the first...
Quiz Rxx
2. What is the state of a page 3. What setting can you use to see information about the different stages of the page life cycle 4. In which life cycle phase does the page determine if it was called as the result of a postback 5. What event is usually used to take actions during the Load phase 6. What are the four kinds of state that ASP.NET manages Which one can you not affect in any way 7. What does the EnableViewState false setting do 8. Where would you store the value of a counter that is...
Testing for RoleBased Authentication Membership
You can also limit access to pages based on the role, or roles, to which the current, logged-in user belongs. Add another page to the SecurityRoles web site called ManagersPage.aspx. As the name implies, this page will be accessible only to managers. To keep the example simple, for now this page will have only an identifying heading and a button to return to the Welcome page, shown in bold in Example 9-1. You can do this in either Source or Design view. Example 9-1. The markup for the...
Virtual Directories
Physically, what comprises a web site A folder on the hard drive of the web server. If the server in question, such as Microsoft IIS Internet Information Services , is operating outside the bounds of Visual Studio, Visual Web Developer, or some other development tool, then the folder containing the web site must be designated as a virtual directory that is, a directory that is mapped to a web URL by the web server. When a user enters that URL into a browser, the request is passed to the web...
Info Vvm
Internet Protected Mode On 31100 .y Figure 3-5. The sample page for exercising the browser history with AJAX controls looks like this. Example 3-1. The SelectedlndexChanged event handler of the RadioButtonList updates the label with the new selected value ByVal e As System.EventArgs _ Handles RadioButtonList1. Labell.Text RadioButtonListl.SelectedValue Next, switch back to Default.aspx in Design view, and drag a ListBox control from the Standard section of the Toolbox onto the page, inside the...
PopupControlExtender
Screen real estate on a web page is often at a premium, so the PopupControlExtender is a very useful tool for presenting the maximum information in a minimum of space. You attach a PopupControlExtender to a control. When the user clicks that control, a pop-up window appears with additional content. If you put an UpdatePanel into the pop up, it can display data retrieved asynchronously from the server a very powerful effect. To see how you can make this feature work for you, you'll modify the...
TextBoxWaterMarkExtender
Many of the Toolkit controls are extenders that is, rather than acting alone, they extend the behavior of one of the standard controls. For example, the TextBoxWaterMarkExtender works with a TextBox to add the watermark effect. The extender has properties to identify which TextBox it will modify, what text will be used as the watermark, and what style should be applied to the watermark text itself. Figures 3-7 and 3-8 demonstrate watermarks in action. Figure 3-7. This is what the watermarked...
Quiz
2. What are the two types of postbacks in ASP.NET, and what is the difference between them 3. What property is found on every control 4. What control would you use to have the user enter a password, but keep the text hidden 5. What control would you use if you have a list of 20 items, and the user can select as many as they want 6. How do you make single radio buttons mutually exclusive 7. What can you use a Panel control for 8. What does the SelectedItem property retrieve 9. How do you include...


