用c#编写时,出现当前上下文中不存在名称 TextBox1 5
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSys...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender,EventArgs e)
{
string caName = TextBox2.Text;
bool b = new CategoryDAO().Insert(caName);
Response.Write(b);
}
}
我已经创建了TextBox2,怎么还是不行啊?运行的话出现下面的情况,我是新手,请给予帮助,谢谢! 展开
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender,EventArgs e)
{
string caName = TextBox2.Text;
bool b = new CategoryDAO().Insert(caName);
Response.Write(b);
}
}
我已经创建了TextBox2,怎么还是不行啊?运行的话出现下面的情况,我是新手,请给予帮助,谢谢! 展开
4个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询