<%@ Page Language="c#" %>
<script runat="server">
void Page_Load()
{
string CapitalCityOfUK;
int NumberOfStates;
CapitalCityOfUK = "London";
NumberOfStates = 50;
Display1.Text = CapitalCityOfUK;
Display2.Text = NumberOfStates.ToString();
}
</script>
<html>
<head>
<title>Creating Variables Example</title>
</head>
<body>
The contents of CapitalCityOfUk is: <asp:Label id="Display1" runat="server"></asp:Label>
<br />
The contents of NumberOfStates is: <asp:Label id="Display2" runat="server"></asp:Label>
</body>
</html>
<script runat="server">
void Page_Load()
{
string CapitalCityOfUK;
int NumberOfStates;
CapitalCityOfUK = "London";
NumberOfStates = 50;
Display1.Text = CapitalCityOfUK;
Display2.Text = NumberOfStates.ToString();
}
</script>
<html>
<head>
<title>Creating Variables Example</title>
</head>
<body>
The contents of CapitalCityOfUk is: <asp:Label id="Display1" runat="server"></asp:Label>
<br />
The contents of NumberOfStates is: <asp:Label id="Display2" runat="server"></asp:Label>
</body>
</html>