web 2.0

ASP.NET(vb.net) Application.Clear() - Application Object

ASP.NET(vb.net) Application.Clear() - Application Object - Application.Clear() : Removes all elements from a Application object

ShotDev Focus:
- ASP.NET(vb.net) Application.Clear() - Application Object

Example

AspNetApplicationClear.aspx

  1. <%@ Page Language="VB" %>  
  2. <script runat="server">  
  3.   
  4. Sub Page_Load(sender As Object, e As EventArgs)  
  5. Application("Database") = "mydatabase.mdb"  
  6. Application("UserID") = "myuser"  
  7. Application("Password") = "mypassword"  
  8.   
  9. Application.Clear()  
  10.   
  11. If Application.Count = 0 Then  
  12. Me.lblText.Text = "Application is nothing"  
  13. Else  
  14. ViewApplication()  
  15. End If  
  16. End Sub  
  17.   
  18. Sub ViewApplication()  
  19. Dim items As Object  
  20. For Each items In Application.Keys  
  21. Me.lblText.Text = Me.lblText.Text & items & " = " & Application(items) & "<br>"  
  22. Next  
  23. End Sub  
  24.   
  25. </script>  
  26. <html>  
  27. <head>  
  28. <title>ShotDev.Com Tutorial</title>  
  29. </head>  
  30. <body>  
  31. <form id="form1" runat="server">  
  32. <asp:Label id="lblText" runat="server"></asp:Label>  
  33. </form>  
  34. </body>  
  35. </html>  

Screenshot

ASP.NET(vb.net) Application.Clear() - Application Object
.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.