if condition in gridview in source code or .aspx page
this will decrease many operation so performance increase.
<Columns> <asp:TemplateField> <ItemTemplate> <asp:ImageButton ID="ifgridview" runat="server" ImageUrl=<%# ((bool) Eval("condition"))? "yes.png":"no.png" %> OnClick="
ifgridview
_Click" /> </ItemTemplate> </asp:TemplateField> </columns>