This is my design
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Font-Names="Arial"
Font-Size="11pt" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px"
CellPadding="4" OnRowCommand="GridView1_RowCommand">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBox ID="CheckAll" onclick="return check_uncheck (this );" runat="server" />
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="ID" Visible="false" Text='<%# DataBinder.Eval (Container.DataItem, "Id") %>'
runat="server" />
<asp:CheckBox ID="deleteRec" onclick="return check_uncheck (this );" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Id" SortExpression="Id">
<EditItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Eval("Id") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Id") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FileName" SortExpression="FileName">
<EditItemTemplate>
<asp:Label ID="LblFileName" runat="server" Text='<%# Eval("FileName") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LblFileName1" runat="server" Text='<%# Bind("FileName") %>'></asp:Label>
<asp:ImageButton ID="img" runat="Server" CommandName="Image" ImageUrl="~/Images/pen.png" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<AlternatingRowStyle BackColor="White" />
<RowStyle BackColor="#F7F7DE" />
<FooterStyle BackColor="#CCCC99" />
<PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
<SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<asp:Panel ID="pnlAddEdit" runat="server" CssClass="modalPopup" Style="display: none"
Width="1000px">
<asp:Label Font-Bold="true" ID="Label4" runat="server" Text="File Data"></asp:Label>
<br />
<table align="center" width="1000px">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="RecordTypeCode"></asp:Label>
</td>
<td>
<asp:Label ID="lblRec" runat="server" Text="Content"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblFileHeader" runat="server" Text="FileHeader"></asp:Label>
</td>
<td>
<asp:Label ID="txtCustomerID" Width="500px" MaxLength="5" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblBatchHeader" runat="server" Text="BatchHeader"></asp:Label>
</td>
<td>
<asp:Label ID="txtBatch" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label2" runat="server" Text="EntryDetail"></asp:Label>
</td>
<td>
<asp:Label ID="txtEntry" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnSave" runat="server" Text="Save" />
</td>
<td>
<asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClientClick="return Hidepopup()" />
</td>
</tr>
</table>
</asp:Panel>
<asp:LinkButton ID="lnkFake" runat="server"></asp:LinkButton>
<cc1:ModalPopupExtender ID="popup" runat="server" DropShadow="false" PopupControlID="pnlAddEdit"
TargetControlID="lnkFake" BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="GridView1" />
<asp:AsyncPostBackTrigger ControlID="btnSave" />
</Triggers>
</asp:UpdatePanel>
I have taken some text boxes inside a panel when a pop-up opens but instead of that i need a gridview to be there as i have to display the content of a large file
This is my data
101 111100022 5104885671104200936A094101CapitalOne MudiamInc
5220MudiamInc A510488567CCDITServices000000110422 1111100020000001
622968765348545646565 00004000001007 rajeshk 1111100020000001
62297877654775676546546 00002888891007 rajeshk 1111100020000002
82200000020194754188000000000000000000688889A510488567 111100020000001
5220MudiamInc A510488567CCDITServices000000110422 1111100020000002
62212345678034354465677 00000864451005 swethau 1111100020000003
62212345678087664534543 00000559841011 swathiK 1111100020000004
62212345678097867546435 00000579351012 lavanyaK 1111100020000005
6221234567806754654435435 00000846761013 AnithaN 1111100020000006
82200000040049382712000000000000000000285040A510488567 111100020000002
9000002000001000000060244136900000000000000000071739300
This i have to show sequentially in an order as
RecordTyecode Content
FileHeader Starting line to be here
BatchHeader Line that come's with 5(First come line)
EntryDetail Number of 6 line has to be added on by one
BatchControl line that starts with 8 has to be here
Again if i have line starts with 5 after 8 that has to be appended like above sequence
Can any give me an idea to add this dynamically a little tricky to understand ask if any information required
This was done in winforms exact i need in web too

Just in a simple way i get this answer
Declared a hash table
In page load i add the following
Here is my code when user clicks on Image button
This works well for me and here is my output after clicking on Image button