一个小的ASP .NET C#问题 [英] a small ASP .NET C# problem
问题描述
您好,
我正在尝试将水平菜单作为我在此处找到的Razor助手示例:
http:// mikepope。 com / blog / DisplayBlog.aspx?permalink = 2341
不幸的是我收到了NullReferenceException错误行
< ul> @ Html.Raw (menuLIitems)LT; / UL>
我在文件MyHelpers.cshtml和Index.cshtml文件的App_Code目录中有你的助手我有
@ MyHelpers.HorizontalMenu(" Home"," About"," Login"," Register")。)
这是非常有趣的因为如果我把将剃刀助手方法导入Index.cshtml没有出现错误。
ASP .NET MVC 5 for MS VS 2015 up3的源代码在这里:
https://drive.google.com/file/d/0B8m2GdF1vex9bTZJalpzcGFhR0E/view?usp=sharing
有人可以帮忙吗?
您是否在 ASP.NET论坛中提出了问题? / A>
Hello,
I am trying Horizontal menu as a Razor helper example I found here:
http://mikepope.com/blog/DisplayBlog.aspx?permalink=2341
Unfortunately I am getting NullReferenceException Error at line
<ul>@Html.Raw(menuLIitems)</ul>
I have your the helper in App_Code directory in file MyHelpers.cshtml and in Index.cshtml file I have
@MyHelpers.HorizontalMenu("Home", "About", "Login", "Register").
It is very interesting because If I put the razor helper method into Index.cshtml no error appears.
Source code in ASP .NET MVC 5 for MS VS 2015 up3 is here:
https://drive.google.com/file/d/0B8m2GdF1vex9bTZJalpzcGFhR0E/view?usp=sharing
Can someone help ?
Have you asked your question in the ASP.NET forum?
这篇关于一个小的ASP .NET C#问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!