0% found this document useful (0 votes)
29 views3 pages

Language Autoeventwireup Codebehind Inherits: M069330 Default - Aspx.Vb

This document contains code for an ASP.NET web form that displays server variable information to labels on the form when a button is clicked. The form contains labels paired with empty labels that will display the server variable values for IP address, port number, software, browser information, server name, protocol, and path. The button click event handler populates these empty labels with the associated server variable values from the Request object.

Uploaded by

Kavita Juliet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

Language Autoeventwireup Codebehind Inherits: M069330 Default - Aspx.Vb

This document contains code for an ASP.NET web form that displays server variable information to labels on the form when a button is clicked. The form contains labels paired with empty labels that will display the server variable values for IP address, port number, software, browser information, server name, protocol, and path. The button click event handler populates these empty labels with the associated server variable values from the Request object.

Uploaded by

Kavita Juliet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 3

M069330

Default.aspx.vb

<%@ Page Language="vb" AutoEventWireup="false"


CodeBehind="Default.aspx.vb" Inherits="WebApplication2._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Untitled Page</title>

</head>

<body>

<form id="form1" runat="server">

<asp:Label ID="Label1" runat="server" Text="IP Adress"></asp:Label>

<asp:Label ID="Label4" runat="server"></asp:Label>

<br />

<asp:Label ID="Label3" runat="server" Text="Server Port


Number"></asp:Label>

<asp:Label ID="Label5" runat="server"></asp:Label>

<br />

<asp:Label ID="Label6" runat="server" Text="Server Software"></asp:Label>

<asp:Label ID="Label7" runat="server"></asp:Label>

<br />

<asp:Label ID="Label8" runat="server" Text="Browser


Information"></asp:Label>

<asp:Label ID="Label9" runat="server"></asp:Label>

<br />

<asp:Label ID="Label10" runat="server" Text="Server Name"></asp:Label>


<asp:Label ID="Label11" runat="server"></asp:Label>

<br />

<asp:Label ID="Label12" runat="server" Text="Server Protocol"></asp:Label>

<asp:Label ID="Label13" runat="server"></asp:Label>

<br />

<asp:Label ID="Label14" runat="server" Text="Path


Information"></asp:Label>

<asp:Label ID="Label15" runat="server"></asp:Label>

<br />

<br />

<asp:Label ID="Label16" runat="server"

Text="TO Display IP Adress, Browsing Using Server Varibales


Contorl"></asp:Label>

<br />

<asp:Button ID="Button1" runat="server" Text="Button" />

</form>

</body>

</html>

Default.aspx

Partial Public Class _Default


Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As


System.EventArgs) Handles Me.Load

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)


Handles Button1.Click
Label4.Text = Request.ServerVariables("remote_addr")
Label5.Text = Request.ServerVariables("Server_port")
Label7.Text = Request.ServerVariables("script_name")
Label9.Text = Request.ServerVariables("http_user_agent")
Label11.Text = Request.ServerVariables("http_host")
Label13.Text = Request.ServerVariables("server_protocol")
Label15.Text = Request.ServerVariables("path_info")
End Sub
End Class

You might also like