如何在MVC 4中调用页面加载视图 [英] How to call a view on page load in MVC 4

查看:118
本文介绍了如何在MVC 4中调用页面加载视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我是MVC 4的新手,我正在尝试类的绑定例程。



例如,如果我绑定类之后自动获取相同的所有例程如果我们在asp.net c#语言中谈话,我想在转发器1的项目绑定命令上绑定repeater2



br />
i不知道如何在mvc中获得这个



更多细节plzz继续

在mvc 4中调用页面加载视图ASPForums.Net [ ^ ]



我尝试过:



http://www.aspforums.net/Threads/166399/call-a-view-on-page-load-in-mvc-4/

Hello I am new to MVC 4 and i am trying bind routine of class .

for example if i bind class after that automatically get the all routine of same class .

if we talk in asp.net c# language i want to bind a repeater2 on item bound command of repeater 1.

i dont have any idea how to get this in mvc

for more detail plzz go on
call a view on page load in mvc 4 | ASPForums.Net[^]

What I have tried:

http://www.aspforums.net/Threads/166399/call-a-view-on-page-load-in-mvc-4/

推荐答案

你好,



如果我的理解是正确的,你需要在你的页面加载到页面的不同部分时显示不同的视图(假设)

您可以随时在MVC中使用部分视图,可能是点击或页面加载,您需要将参数传递给任何 ActionResult 方法并从该action方法返回一个局部视图,并在布局视图中使用loadUrl方法。



我希望你得到了我想解释的东西。

谢谢
Hello,

If my understanding is correct and you need to display different views when your page loads on different sections of your page (suppose)
You can always use Partial views in MVC, may it be on a click or page load, you need to pass parameters to any ActionResult method and return a partial view from that action method, and use the loadUrl method on your layout view.

I hope you got what I am trying to interpret.
Thanks


这篇关于如何在MVC 4中调用页面加载视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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