Click event of ext button is not firing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AspNet8
    New Member
    • Apr 2012
    • 1

    Click event of ext button is not firing

    I have an asp.net page.On which i have a link.
    When user clicks the link a new ext window opens up. on which a ext button is there.When the user clicks the button it is not working.
    Code to call is
    Code:
    <ext:Button ID="btnAddIconURL" runat="server" Text="Add Icon URL" Icon="Add">
      <DirectEvents>
        <click OnEvent="Save">
        </click>
      </DirectEvents>
    </ext:Button>
    Save is a function in code behind.
    Last edited by Frinavale; Apr 10 '12, 05:18 PM. Reason: Added code tags and fixed indentation.
  • Monomachus
    Recognized Expert New Member
    • Apr 2008
    • 127

    #2
    As I see in your code, you actually don't need the
    Code:
    <DirectEvents>
    section because you would need it only if you'd need a confirmation popup OnEvent Save.

    So what you would need instead is the property OnDirectClick.

    Code:
    <ext:Button ID="btnAddIconURL" runat="server" Text="Add Icon URL" Icon="Add" OnDirectClick="Save">
    I got it all from this demo page.
    Ext.NET Examples Explorer. Contribute to extnet/examples.ext.net development by creating an account on GitHub.

    There is a button Source Code there.

    Comment

    Working...