using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;namespace MyGame
{
public class AppGlobalInfo
{
public static string ThemeName()
{
return "Default";
}
}
}@{
Layout = "~/Views/Themes/MyGame/My/_Administrator.cshtml";
ViewBag.Title = "???";
}
@for (int i = 0; i < 100; i++)
{
@AppGlobalInfo.AppGlobalInfo.ThemeName();
<p style="font-size:10px;">@i</p>
}
Server Error in '/' Application.Compilation ErrorDescription: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0433: The type MyGame.AppGlobalInfo' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\74643291\eb640423\assembly\dl3\ff8dc3e8\002f0e16_0f51cd01\MyGame.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\74643291\eb640423\App_Code.a9cl9ms2.dll'Source Error:Line 6: @for (int i = 0; i < 100; i++)Line 7: {Line 8: @MyGame.AppGlobalInfo.ThemeName();Line 9: <p style="font-size:10px;">@i</p> Line 10: }
using System.Collections.Generic;
using System.Linq;
using System.Web;namespace MyGame
{
public class AppGlobalInfo
{
public static string ThemeName()
{
return "Default";
}
}
}@{
Layout = "~/Views/Themes/MyGame/My/_Administrator.cshtml";
ViewBag.Title = "???";
}
@for (int i = 0; i < 100; i++)
{
@AppGlobalInfo.AppGlobalInfo.ThemeName();
<p style="font-size:10px;">@i</p>
}
Server Error in '/' Application.Compilation ErrorDescription: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0433: The type MyGame.AppGlobalInfo' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\74643291\eb640423\assembly\dl3\ff8dc3e8\002f0e16_0f51cd01\MyGame.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\74643291\eb640423\App_Code.a9cl9ms2.dll'Source Error:Line 6: @for (int i = 0; i < 100; i++)Line 7: {Line 8: @MyGame.AppGlobalInfo.ThemeName();Line 9: <p style="font-size:10px;">@i</p> Line 10: }
解决方案 »
- 求C#转VB
- 一个ajax无刷新的例子或者原理
- FLASH怎么向ASPX传递数据
- 一个叫department的表,里面只有一个字段name,一共有4条纪录,分别是a,b,c,d,对应四个球对,现在四个球对进行比赛,用一条sql语句显示所
- wf(微软工作流)群欢迎加入
- 为什么DataGrid 无法显示
- 绑定dataset的问题
- 请教ado.net高手。关于SqlParameter 动态创建******问过N多的人。找过N多以前的贴子到今未得到解决。向高手求解
- 谁做过icbc的b2b开发
- 多谢Cnapollo,我的问题已经解决了,请接分!
- asp Literal text中图片不显示
- label的值怎么不自动消掉。。
是否应是@AppGlobalInfo.ThemeName();
{
@MyGame.AppGlobalInfo.ThemeName();
<p style="font-size:10px;">@i</p>
}更正一下,是这样但也不行。
如果那个类不放在APP_Code就没有问题。一放到APP_CODE就有这种错误提示了。