Using for loop at design side to create rows and column, defined by the user

Posted by Bhavna81 under ASP.NET category on | Views : 3135
Hello every body,
This code help you to create more then one row, column and table using for loop.
Here no need to write tags more then one time .

<form id="form1" runat="server">
<table width="30%" border="3">
<td style="width:10%" align="center">
Roll No.
<td style="width:40%" align="center">
<%for (int i = 1; i <= 5; i++)
ArrayList s1 = new ArrayList { "Bhavna", "Sandhya", "Seema", "Prity", "Tejal" };%>

<td align="center">
<% Response.Write(i); %>
<% Response.Write(s1[i-1]); %>
<%} %>


Comments or Responses

Login to post response