30.07.2013 Views

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

996 ASP .<strong>NET</strong>, Web Forms and Web Controls Chapter 20<br />

10 <br />

11 <br />

12 <br />

14 <br />

15 <br />

16 <br />

18 <br />

19 <br />

20 <br />

21<br />

22 Recommendations<br />

26 <br />

27<br />

28 <br />

31 <br />

32<br />

33 <br />

34 <br />

35 <br />

Fig. 20.32 Session information displayed in a ListBox (part 2 of 2).<br />

1 ' Fig. 20.33: RecommendationPage.aspx.vb<br />

2 ' Reading cookie data from the client<br />

3<br />

4 Imports System.Web.UI.WebControls<br />

5<br />

6 Public Class Recommendations<br />

7 Inherits Page<br />

8 Protected WithEvents recommendationLabel As Label<br />

9 Protected WithEvents booksListBox As ListBox<br />

10<br />

11 ' <strong>Visual</strong> Studio .<strong>NET</strong> generated code<br />

12<br />

13 Private Sub Page_Init(ByVal sender As System.Object, _<br />

14 ByVal e As System.EventArgs) Handles MyBase.Init<br />

15<br />

16 InitializeComponent()<br />

17<br />

18 Dim i As Integer<br />

19 Dim keyName As String<br />

20<br />

Fig. 20.33 Session data read by an ASP .<strong>NET</strong> Web application <strong>to</strong> provide<br />

recommendations for the user (part 1 of 2).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!