GridView is not rendered until you set its
dataSource
property and call
dataBind
().
Try following
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
int[] i = new int[10];
GridView1.DataSource = i;
GridView1.DataBind();
}
}
You may change the Length of the Array to get more rows.
int[] i = new int[100];
Change the Control name in your GridView
<ItemTemplate>
<asp:TextBox Id="dregreName" runat="server"></asp:TextBox>
</ItemTemplate>