Mega Code Archive

 
Categories / ASP.Net Tutorial / Sessions
 

Look for Variables

<% @ Page Language="VB" %> <html> <head>    <title>Look for Variables</title> </head> <body>   <center><h1>Look for Session and Application Variables</h1></center><hr/>   <%     Dim Book, Chapter, Publisher, Author As String     Book = Session("Book")     Chapter = Session("Chapter")     Publisher = Application("Publisher")     Author = Application("Author")          If (Book = Nothing) Then       Response.Write("Book: Unknown <br/>")     Else       Response.Write("Book: " & Book & "<br/>")     End If     If (Chapter = Nothing) Then       Response.Write("Chapter: Unknown <br/>")     Else       Response.Write("Chapter: " & Chapter & "<br/>")     End If     If (Publisher = Nothing) Then       Response.Write("Publisher: Unknown <br/>")     Else       Response.Write("Publisher: " & Publisher & "<br/>")     End If     If (Author = Nothing) Then       Response.Write("Author: Unknown <br/>")     Else       Response.Write("Author: " & Author & "<br/>")     End If   %> </body> </html>