datatable设的全局变量不能用
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DataSetCourseTableAdapters;
public partial class 学生选课 : System.Web.UI.UserControl
{
DataTable dt = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
submit.Visible = false;
}
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DataSetCourseTableAdapters;
public partial class 学生选课 : System.Web.UI.UserControl
{
DataTable dt = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
submit.Visible = false;
}
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
DataTable2TableAdapter dtt = new DataTable2TableAdapter();
string department = ddlDepartmentName.SelectedItem.Text;
string special = ddlSpecialName.SelectedItem.Text;
string coursename = TextBox1.Text;
string Teachername = TextBox2.Text;