The things I learnt while I migrated from classic asp to asp.net is given here for my reference as well as for new beginners.

TWO DIMENTIONAL ARRAY C# CODE

C# code for

TWO DIMENTIONAL ARRAY

<%@ Page Language="C#" %>
<script runat="server">
void Page_Load()
{
if(Page.IsPostBack)
{
string [,] myArray = new string[3,2];
myArray[0,0] = "raja";
myArray[0,1] = "26";
myArray[1,0] = "roja";
myArray[1,1] = "21";
myArray[2,0] = "pooja";
myArray[2,1] = "18";
int recordID = Convert.ToInt32(TextBox1.Text);
Label1.Text = "Name :" + myArray[recordID,0];
Label1.Text = Label1.Text + ",Age : " + myArray[recordID,1];
}
}
</script>
<html>
<head>
<title>Array Example</title>
</head>
<body>
<form id="Form1" runat="server">
Enter the Record ID
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Get Name and Age" />
<br />
<asp:Label ID="Label1" runat="server"></asp:Label>
<asp:Label


</form>
</body>
</html>



Thanks for Your Visit

Google Search
Disclaimer and Copy Right