命名空间并不直接包含诸如字段或方法之类的成员
出错信息:错误 1 命名空间并不直接包含诸如字段或方法之类的成员 F:\StudentManager\StudentManager\Global.asax.cs 57 1 StudentManagerusing System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Xml.Linq;
namespace StudentManager
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
}
protected void Session_Start(object sender, EventArgs e)
{
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
}
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
}
protected void Application_Error(object sender, EventArgs e)
{
}
protected void Session_End(object sender, EventArgs e)
{
}
protected void Application_End(object sender, EventArgs e)
{
}
}
}
<% Application Language="C#" %>
<script runat="server">
void Application_Start(object sender, EventArgs e)
{
// 在应用程序启动时运行的代码
}
void Application_End(object sender, EventArgs e)
{
// 在应用程序关闭时运行的代码
}
void Application_Error(object sender, EventArgs e)
{
// 在出现未处理的错误时运行的代码
}
void Session_Start(object sender, EventArgs e)
{
// 在新会话启动时运行的代码
}
void Session_End(object sender, EventArgs e)
{
// 在会话结束时运行的代码。
// 注意: 只有在 Web.config 文件中的 sessionstate 模式设置为
// InProc 时,才会引发 Session_End 事件。如果会话模式设置为 StateServer
// 或 SQLServer,则不会引发该事件。
}
</script>
本人刚开始学 是在visual studio 2008 sql2000 中
代码是直接从光盘中复制的 光盘中的代码是在visual studio 2005下写的
可是调试时就出现上面的问题 在网上搜了很多 可是仍然解决不了啊
快毕业答辩了 直接无语了 跪求解决方法 拜托各位了!
--------------------编程问答-------------------- 你贴的是Global.asax.cs 文件吗? --------------------编程问答-------------------- 贴的神马代码?
怎么方法出现两次,神马情况?
--------------------编程问答-------------------- 只用一个就行了 你可以把script的删除用类的
也可以把类删除
补充:.NET技术 , ASP.NET