while accessing previous page checkbox control state . im getting object null refernce exception . due to that control is present in grid view control .

<asp:GridView ID="GridAddEmp" runat="server" AutoGenerateColumns="False" OnRowCreated="GridAddEmp_RowCreated">  
        <Columns> 
 <asp:TemplateField HeaderText="Licencing">  
                <ItemTemplate>  
                    <asp:CheckBox Text="Licencing" runat="server" Width="100px" ID="chkLicencing"   />
                </ItemTemplate>  
            </asp:TemplateField> 

button click event

Response.Write("<script>");
                Response.Write("window.open('PurchaseOrderPrint.aspx?val=" + this.uniqueid + "','_blank')");
                Response.Write("</script>");

 string licencing = ((CheckBox)PreviousPage.FindControl("chkLicencing")).Checked.ToString();

Related posts

Recent Viewed