使用javascript调用ViewComponent [英] Invoke ViewComponent using javascript

查看:58
本文介绍了使用javascript调用ViewComponent的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含几个视图组件的网页,当我单击这些组件时,会为其打开一个简单的编辑器,请参见下图.如果我编辑文本并按Enter键,我想重新渲染视图组件而不是孔页面.是否可以使用javascript调用视图组件以获取此行为?

I have a web page with a couple of view components, when I click on these components I open a simple editor for it, see image below. If I edit the text and hit enter, I would like to rerender the view component and not the hole page. Is it possible to invoke a view component using javascript to get this behaviour?

推荐答案

今天无法实现,但是您可以根据需要为视图组件构建标准代理(类似地,您可以为部分视图构建代理).例如您可以执行某项操作的全部属性路由.

This is not possible today but you could build a standard proxy for viewcomponents if you'd like though (similarly you could build a proxy to partial views). e.g. you a catchall attribute route on an action.

这篇关于使用javascript调用ViewComponent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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