I want to print all the numbers in the loop .....
How should I do it ?
Please help !
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication5._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat ="server" >
void Page_load()
{
int counter = 0;
while (counter <= 10)
{
messageLabel.Text = counter.ToString();
counter++;
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Loops with C#</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID = "messageLabel" runat = "server"/>
</div>
</form>
</body>
</html>