如何从布局调用索引中的函数。 [英] How Can I Call A Function In Index From Layout.

查看:64
本文介绍了如何从布局调用索引中的函数。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

function SetFocus(e, Control)
{
    if (getKeyCode(e) == 13)
    {
        document.getElementById(Control).focus(); return false;
    }
    return true;
}

推荐答案

通过这种方式你从布局页面调用了Action /方法 -



在布局页面中设置 -



@ {Html.RenderAction(Category,Home);}







这将调用家庭控制器的类别操作。
By this way you called the Action/method from layout page-

Set in layout page-

@{Html.RenderAction("Category", "Home");}



This will invoke Category action of home controller.


这篇关于如何从布局调用索引中的函数。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆