现在回到旧的绘图板,因为我是stack
,我也是Overflow
我正在MVC5
中建立网页
我想在当前页面中显示一个错误
为了做到这一点,我在Routeconfig
文件中使用了以下功能:
routes.RouteExistingFiles = True
routes.MapRoute(
name:="UHerror",
url:="{controller}/{action}/{id}",
defaults:=New With {.controller = "login", .action = "UHPageErrorIndex", .id = UrlParameter.Optional}
)
然后在我的controller
中使用以下功能:
Public Function UHPageErrorIndex() As ActionResult ' JavaScriptResult
Dim routes As New RouteCollection With {.RouteExistingFiles = True}
Return View("login", "UsersHandlerIndex")
End Function
我的View page
名为UsersHandlerIndex
在名为Layout page
的{{1}}中,我使用以下_UsersHandlerLayout
java script
现在有了这种“方法”,我无法回叫<script type="text/javascript">
$(document).ready(function () {
var errCall = '@dataEntry.My.Resources.Properties.errorCall.ToString';
var errMess = 'ErrorMessage:= \r\n' + '@dataEntry.My.Resources.Properties.InnerError';
if (errCall == 'True') { window.alert(errMess); }
});
</script>
我的refresh
页面
我曾在Stack Overflow中查看过其他类似问题,但没有人讨论该问题。
从控制器刷新页面。那就是我要为那些未做的事情做的
有没有人可以协助我?