Output HTTP Header (VB.net) : HTTP Header « Request « ASP.Net






Output HTTP Header (VB.net)

<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
    Dim I As Integer
    lblMessage1.Text = "<Table>"
    For I = 0 To Request.Headers.Count - 1
        lblMessage1.Text = lblMessage1.Text _
            & "<TR><TD><B>" & Request.Headers.GetKey(I) _
            & "</B></TD><TD>" & Request.Headers(I) _
            & "</TD></TR>"
    Next
    lblMessage1.Text = lblMessage1.Text & "</Table>"
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Headers Sample Page</TITLE>
</HEAD>
<BODY >
<form runat="server">
<Font Face="Tahoma">
<asp:Label
    id="lblMessage1"
    runat="Server"
    Font-Bold="True"
/>
</Font>
</Form>
</BODY>
</HTML>

           
       








Related examples in the same category

1.Showing HTTP Headers via the Headers Collection in ASP.NET
2.Displaying the HTTP headers collection in ASP.NET with for loop
3.Displaying the HTTP headers collection in ASP.NET with 'select case statement'