Categories

display the user agent

This example will display the user agent. In other words information about the browser

display the user agent

<% If Not Request.UrlReferrer Is Nothing Then Response.Write("Referrer : " & Request.UrlReferrer.ToString() & "<br>") Else Response.Write("Referrer : no referrer<br>") End If

Response.Write("User Agent : " & Request.UserAgent() & "<br>") %>

Bookmark It

get the host address

get the host address

get the host address

<% If Not Request.UrlReferrer Is Nothing Then Response.Write("Referrer : " & Request.UrlReferrer.ToString() & "<br>") Else Response.Write("Referrer : no referrer<br>") End If

Response.Write("Host Address is " & Request.UserHostAddress.ToString & "<br>") %>

Bookmark It

get the host name

get the host name

get the host name

<% If Not Request.UrlReferrer Is Nothing Then Response.Write("Referrer : " & Request.UrlReferrer.ToString() & "<br>") Else Response.Write("Referrer : no referrer<br>") End If

Response.Write("Host Name : " & Request.UserHostName & "<br>") %>

Bookmark It

Create a link

This example creates a link in ASP.net

Create a link

<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <script runat="server"> Sub Page_Load link1.Href="http://www.programmershelp.co.uk" link1.Target="_blank" link1.Title="Programmershelp" End Sub </script> </head> <body> <form runat="server"> <a id="link1" runat="server">Programmershelp</a> <br /> </form> </body> </html>

Bookmark It

Button example

This will display a button which when pressed will display a message underneath it

Button example

<script runat="server"> Sub button1(Source As Object

Bookmark It