Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

confirmation and web image button

Last post 08-29-2008 16:22 by [Infragistics] Vince McDonald. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-21-2008 8:23

    • krinas
    • Not Ranked
    • Joined on 08-04-2008
    • Points 20

    confirmation and web image button

     

    Hello, I have one problem with the web image button control, I just want to put confirmation using  js 

    the code is (On page load):

     

     

      WebImageButton.Attributes.Add("onclick", "if(confirm('Are you sure to delete?')){}else{return false}")

     The problem is that whatever I choose  at the confirm window the code is always executing.

     

     

    I have tried that to a standar button and works fine.

     

    Thanxs in advance.

     

    Filed under:
    • Post Points: 20
  • 08-29-2008 16:22 In reply to

    Re: confirmation and web image button

    Instead of "return false" to cancel the postback (which works on a standard ASP.NET button), set "oEvent.cancelPostBack = true;".

    Vince McDonald
    Manager of Developer Support, MCP
    Infragistics, Inc.

    Was this post helpful? Please let me know by using the star ratings and the "Answered" button from the forum's web interface.

    Need help? Find the various ways you can ask for help from Infragistics.
    • Post Points: 5
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems