Hi all,
I want to export gridview data to excel and pdf. i got code from internet sources and tried.. but it shows error: Control 'gv_export' of type 'GridView' must be placed inside a form tag with runat=server.
but i placed the gridview in form tag with runat=server only. but i don't know y this error raised.. please help me to clear this...
My code..
<body>
<form id="form1" runat="server">
<asp:GridView runat="server" ID="gv_export" AutoGenerateColumns="false">
<Columns>
<asp:TemplateField HeaderText="S.No">
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" Text="<%# Container.DataItemIndex + 1 %>" CommandName="history" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" Font-Underline="false" ToolTip="show h ...
Go to the complete details ...