Help me...Ext.net.DirectMethods.btnSaveUserInfo is not a function...

  1. #1

    [Closed]Help me...Ext.net.DirectMethods.btnSaveUserInfo is not a function...

    Dear All

    I used a Button Control in UserControl

    <Buttons>
            <ext:Button ID="btnSaveUserInfo" runat="server" Text="Save" Icon="Disk">
                <Listeners>
                    <Click Handler="
                        Ext.net.DirectMethods.btnSaveUserInfo_Click({
                            success:function(result){
                                            if(result===true){
                                                 Ext.Msg.alert('tips','Succeed');
                                            }
                                            else{
                                                Ext.Msg.alert('tips','Failed');
                                            }
                                        }
                        });
                    " />
                </Listeners>
            </ext:Button>
    and in my code-behind.I was defined a method "btnSaveUserInfo_Click"

    [DirectMethod(ShowMask = true, Msg = "Please wait .......")]
            public bool btnSaveUserInfo_Click()
            {
                 return false;            
            }
    when I run this page,it will show the error msg:

    Error: Ext.net.DirectMethods.btnSaveUserInfo_Click is not a function
    Could anyone tell me how will i do?

    Best Regards & Thanks
    Last edited by wentai2011; Jun 28, 2011 at 11:50 AM. Reason: close the post
  2. #2
    Hi,

    Use
    #{DirectMethods}.btnSaveUserInfo_Click(....
    or investigate the following samples for other solutions
    https://examples1.ext.net/#/Events/DirectMethods/UserControls/
    https://examples1.ext.net/#/Events/D...thods/ID_Mode/
  3. #3
    Quote Originally Posted by Vladimir View Post
    Hi,

    Use
    #{DirectMethods}.btnSaveUserInfo_Click(....
    or investigate the following samples for other solutions
    https://examples1.ext.net/#/Events/DirectMethods/UserControls/
    https://examples1.ext.net/#/Events/D...thods/ID_Mode/

    But how can I received the return value?

    Best Regards & Thanks
  4. #4
    Quote Originally Posted by Vladimir View Post
    Hi,

    Use
    #{DirectMethods}.btnSaveUserInfo_Click(....
    or investigate the following samples for other solutions
    https://examples1.ext.net/#/Events/DirectMethods/UserControls/
    https://examples1.ext.net/#/Events/D...thods/ID_Mode/
    Thank you very much.
    I had resolved it.

    #{DirectMethods}.btnSaveUserInfo_Click({success:function(result){
                                alert(result);
                            }
                        });
    the "result" is the return value.

    Best Regards & Thanks
    Last edited by geoffrey.mcgill; Jun 28, 2011 at 4:55 PM.

Similar Threads

  1. DirectMethods Problem
    By aelen in forum 1.x Help
    Replies: 3
    Last Post: Dec 26, 2011, 5:34 AM
  2. Replies: 4
    Last Post: Aug 24, 2011, 11:29 AM
  3. DirectMethods With Parameters
    By perrillos in forum 1.x Help
    Replies: 3
    Last Post: Jul 19, 2011, 4:09 PM
  4. [CLOSED] [1.0] MVC Ext.net.DirectMethods
    By alliedwallet.com in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jan 19, 2011, 10:31 PM
  5. DirectMethods Call Twice
    By santosbj in forum 1.x Help
    Replies: 2
    Last Post: Jun 17, 2010, 2:34 AM

Tags for this Thread

Posting Permissions