Note that there are some explanatory texts on larger screens.

plurals
  1. POIn asp.net, To enable/disable imagebutton, How can I access ImageButton control of Gridview->Itemtemplate->panel in asp.net code behind file
    text
    copied!<p>I am new in .net.</p> <p>Please help me to access ImageButton control of Gridview->Itemtemplate->panel in asp.net code behind file.</p> <p>Below is my code.</p> <pre><code>&lt;asp:GridView ID="GridView2" runat="server" DataKeyNames="nInquiryId" AutoGenerateColumns="False"&gt; &lt;Columns&gt; &lt;asp:TemplateField&gt; &lt;HeaderTemplate&gt; &lt;table width="100%" cellpadding="5" cellspacing="1"&gt; &lt;tr&gt; &lt;td align="left" style="width: 80px"&gt; &lt;asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="sort" CommandArgument="sFName"&gt;First Name&lt;/asp:LinkButton&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/HeaderTemplate&gt; &lt;ItemTemplate&gt; &lt;asp:Panel ID="PopupMenu" runat="server"&gt; &lt;div style="padding-top: 2px;"&gt; &lt;asp:ImageButton ID="ModifyLnk" runat="server" CommandName="Select" EnableTheming="false" ImageUrl="~/Admin/Images/edit.png" CausesValidation="false" runat="server" /&gt; &lt;/div&gt; &lt;/asp:Panel&gt; &lt;asp:Panel ID="Panel9" runat="server"&gt; &lt;table width="100%" cellpadding="0" cellspacing="1"&gt; &lt;tr&gt; &lt;td align="left" style="width: 80px"&gt; &lt;asp:Label ID="lbltitle" runat="server" Text='&lt;%# Eval("sFName")%&gt;'&gt;&lt;/asp:Label&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/asp:Panel&gt; &lt;cc1:HoverMenuExtender ID="hme2" runat="Server" HoverCssClass="popupHover" PopupControlID="PopupMenu" PopupPosition="Left" TargetControlID="Panel9" PopDelay="25"&gt; &lt;/cc1:HoverMenuExtender&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; </code></pre> <p>I want to enable/disable image button in code behind file. </p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload