EXT.NET JS取CS页面中方法返回的值

来源:互联网 发布:基金定投算法 编辑:程序博客网 时间:2024/06/05 20:57

前台JS

X.GetTimeStamp({
                success: function (result) {
                    Ext.Msg.alert('提示', result);
                },
                eventMask: {
                    showMask: true,
                    minDelay: 500
                }
            });

后台方法

        #region 取服务器时间
        /// <summary>
        /// 取服务器时间
        /// </summary>
        [DirectMethod]
        public string GetTimeStamp()
        {
            return DateTime.Now.ToLocalTime().ToString();
        }
        #endregion

0 0