title: ASP.net javascript fire on asp:ImageButton
body: <p>Hey all i am trying to figure out why i am getting this error when my page loads:</p>
  
  <pre><code> Compiler Error Message: BC30456: 'showNotifier' is not a member of 'ASP.pro_aspx'.
  </code></pre>
  
  <p>showNotifier is a javascript call that i have to display a error message that drops down from the top of the browser screen using jQuery. I have the javascript code loading up in my master page so i know its there on any page.</p>
  
  <p>Here is my imagebutton code:</p>
  
  <pre><code> &lt;asp:ImageButton ID="btnDelete" CommandName="Delete" CommandArgument='&lt;%#Eval("id") %&gt;' Text="Delete" runat="server" CssClass="delIcon" AlternateText="Delete" ToolTip="Delete" ImageUrl="~/del.png" /&gt;
  </code></pre>
  
  <p>Any help would be great!</p>
  
  <p><strong>Additional code</strong></p>
  
  <pre><code>Protected Sub grdView_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles grdView.RowCommand
      Dim cid As String = e.CommandArgument.ToString
      Dim command As String = e.CommandName.ToString
  
      If cid.Length &lt;= 0 Then Exit Sub
  
      Select Case command
          Case "Delete"
              Delete(cid)
      End Select
  End Sub
  </code></pre>
  
  <p><strong>Additional code 2</strong></p>
  
  <pre><code>Private Sub grdView_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles grdView.RowDataBound
      If (e.Row.RowType = DataControlRowType.DataRow) Then
          Dim l As ImageButton = CType(e.Row.FindControl("btnDelete"), ImageButton)
  
          l.Attributes("OnClientClick") = "if(msgBoxShow('Are you sure you want to delete " &amp; DataBinder.Eval(e.Row.DataItem, "Name") &amp; "?','" &amp; DataBinder.Eval(e.Row.DataItem, "Name") &amp; "','')==false){return false;}"
      End If
  End Sub
  </code></pre>
  
  <p>Javascript code is this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function msgBoxShow(boxsaying, prodItemName, codeBehind) {
      apprise(boxsaying, {
          'verify': true,
          'textYes': 'Delete ' + prodItemName,
          'textNo': 'Cancel delete'
      },
                  function (r) {
                      if (r) {
                          //alert('yes');
                          return true;
                      } else {
                          //alert('no');
                          return false;
                      }
                  }
             );
  }
  &lt;/script&gt;
  </code></pre>