All Request Server Variables (VB.net) : Server Variables « Server « ASP.Net






All Request Server Variables (VB.net)

<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
    Dim NameArray() As String
    Dim VisitorSV As NameValueCollection
    Dim I as Integer
    VisitorSV = Request.ServerVariables
    NameArray = VisitorSV.AllKeys
    For I = 0 To UBound(NameArray)
        lblMessage.Text = lblMessage.Text _
            & NameArray(I) & ": " _
            & VisitorSV.Item(I) & "<BR>"
    Next
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Server Variables Page</TITLE>
</HEAD>
<BODY LEFTMARGIN="40" TOPMARGIN="30">
<form runat="server">
<asp:Label
    id="lblMessage"
    runat="Server"
/>
</Form>
</BODY>
</HTML>

           
       








Related examples in the same category

1.Request Server Variables Item(REMOTE_ADDRESS) (VB.net)
2.Get all server variables (VB.net)