CS0103: 当前上下文中不存在名称“BaseClass” 应该怎么办啊 10

usingSystem;usingSystem.Collections;usingSystem.Configuration;usingSystem.Data;usingS... using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace examonline
{
public partial class Login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void btnlogin_Click(object sender, EventArgs e)
{

if (this.ddlstatus.SelectedValue == "学生")
{
if (BaseClass.CheckStudent(txtNum.Text.Trim(), txtPwd.Text.Trim()))
{
Session["ID"] = txtNum.Text.Trim();
Response.Redirect("student/studentexam.aspx");
}
else
{
Response.Write("<script>alert('您不是学生或者用户名和密码错误');location='Login.aspx'</script>");
}
}
if (this.ddlstatus.SelectedValue == "教师")
{
if (BaseClass.CheckTeacher(txtNum.Text.Trim(), txtPwd.Text.Trim()))
{
Session["teacher"] = txtNum.Text;
Response.Redirect("teacher/TeacherManage.aspx");
}
else
{
Response.Write("<script>alert('您不是教师或者用户名和密码错误');location='Login.aspx'</script>");
}
}

}
protected void btnconcel_Click(object sender, EventArgs e)
{
RegisterStartupScript("提示", "<script>window.close();</script>");
}
}
}

行 26: if (this.ddlstatus.SelectedValue == "学生")
行 27: {
行 28: if (BaseClass.CheckStudent(txtNum.Text.Trim(), txtPwd.Text.Trim()))
行 29: {
行 30: Session["ID"] = txtNum.Text.Trim();

其中BaseClass.CheckStudent这个函数是放在一个叫BaseClass.cs的库里面
展开
 我来答
兄弟抱一下53
2015-08-28 · TA获得超过884个赞
知道答主
回答量:373
采纳率:66%
帮助的人:105万
展开全部
编译器异常信息: CS0103: 当前上下文中不存在名称“typeText”
www.MyException.Cn 网友分享于:2015-08-26 浏览:232次

编译器错误信息: CS0103: 当前上下文中不存在名称“typeText”
请高和解决下面这个问题:

“/”应用程序中的服务器错误。
--------------------------------------------

编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。

编译器错误信息: CS0103: 当前上下文中不存在名称“typeText”

源错误:

行 23: Repeater1.DataSource = ds.Tables[0];
行 24: //以下部分到 this.DataBind(sqlTemp)有问题.我的想法是:当获取不同的URL参数就会显示相应类型的新闻.
行 25: if(typeText==17)
行 26: { sqlTemp += "and 17 "; }
行 27: if(typeText=34)

源文件: e:\n\3CMarket\newsList.aspx.cs 行: 25

------解决方案--------------------
typeText??什么东西?textbox么?
那肯定是typeText.text,你==后面是int类型,所以还要做强行转换为int类型
if(Convert.ToInt16(typeText.Text)==17)
------解决方案--------------------
string tpyeText=request.QueryString[ "TypeID "];
===============================================
string typeText=request.QueryString[ "TypeID "];

你拼错单词了,是typeText
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
酱油丶yy
2018-11-16
知道答主
回答量:1
采纳率:0%
帮助的人:787
展开全部
楼主您好!请问你是怎么弄好的,可以教我一下吗
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
解忧解忧杂货铺
2012-04-07 · TA获得超过590个赞
知道小有建树答主
回答量:1536
采纳率:33%
帮助的人:681万
展开全部
BaseClass using了吗?把鼠标放到BaseClass 点鼠标右键看看
追问
BaseClass using 怎么引用,具体该怎么写,鼠标点右键是看什么,属性吗?本人新手,谢谢指教
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 2条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式