[EXT.NET]后台返回值

    <ext:Button ID="Button1" runat="server" Text="计算100平方数" Icon="Lightning">
        <Listeners>
            <Click Handler="
                Ext.net.DirectMethods.GetTimeStamp(100,{
                    success: function (result) {
                      txtGet.setValue(result);
                    }
                });" />
        </Listeners>
    </ext:Button>
    <ext:TextField ID="txtGet" runat="server"  FieldLabel="测试结果"></ext:TextField>

    [DirectMethod]
    public string GetTimeStamp(int value)
    {
        int result = value * value;
        return result.ToString();
    }

你可能感兴趣的:(function,String,server,ext,button)