Hi,
I am having button field in grid for print button.
<asp:GridView ID="griddata" runat="server" AutoGenerateColumns="False" DataKeyNames="BillID"
HeaderStyle-CssClass="txtbx" CssClass="txtbx" Visible="False" Width="857px">
<Columns>
<asp:ButtonField CommandName="PRINT" ButtonType="Image" HeaderText="Print" ImageUrl="~/images/print.gif"
Text="PRINT">
<HeaderStyle ForeColor="Green" />
</asp:ButtonField>
</Columns>
<HeaderStyle CssClass="txtbx" />
</asp:GridView>
On grid row command i open url with query string the page i want to print, then press ctrl+p to take print.
Protected Sub gridData_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles griddata.RowCommand
If e.CommandName = "PRINT" Then
Response.Redirect("frmBillWO.aspx?qsBillID=" & griddata.DataKeys(e.CommandArgument).Value)
End If
End Sub
how to open other page directly for print on button click in grid