本文介绍了如何编写一个简单的函数来返回带有两个参数的视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有这个函数来返回一个视图I have this function to return a viewFunction mostrar(cor As String, alinea As Char) As ActionResult ViewBag.cor = cor ViewBag.alinea = alinea Return View() End Function 这是查看this is the view@Code ViewBag.Title = "mostrar" End Code<h2>mostrar</h2><h4>@viewbag.cor</h4><h4>@ViewBag.alinea</h4> 函数从代码调用但不返回任何视图。但我知道参数输入功能。 如果我把它放在URL中: http:// localhost:16844 / prescavi / mostrar?cor = red& alinea = s 视图效果很好...the function is called from code but no view is returned. But i know the parameters enter function.if i put this in the URL:http://localhost:16844/prescavi/mostrar?cor=red&alinea=sThe view works perfectly...推荐答案 这篇关于如何编写一个简单的函数来返回带有两个参数的视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-14 16:25