This repository has been archived by the owner. It is now read-only.
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (32 sloc) 1.15 KB
<script language="C#" runat="server">
void Page_Load(Object Src, EventArgs E) {
Random randomGenerator = new Random(DateTime.Now.Millisecond);
int randomNum = randomGenerator.Next(0, 3);
switch(randomNum) {
case 0:
Name.Text = "Scott";
case 1:
Name.Text = "Fred";
case 2:
Name.Text = "Adam";
AnchorLink.NavigateUrl = "controls_navigationtarget.aspx?name=" + System.Web.HttpUtility.UrlEncode(Name.Text);
<h3><font face="Verdana">Performing Page Navigation (Scenario 1)</font></h3>
This sample demonstrates how to generate a HTML Anchor tag that will cause the client to
navigate to a new page when he/she clicks it within the browser.
<asp:hyperlink id="AnchorLink" font-size=24 runat=server>
Hi <asp:label id="Name" runat=server/> please click this link!