我新的ASP.NET,並試圖獲取數據從數據庫中設置的,但正如標題所說預期類,委託,枚舉,接口或結構
下面是代碼我有一個錯誤,有什麼問題?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class Admin_addNode : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
var category = new category();
DataSet ds = new DataSet();
ds = category.getNode();
DataTable tbl = ds.Tables[0];
for (int i = 0; i < tbl.Rows.Count; i++)
{
DataRow myRow = tbl.Rows[i];
string MyValue = myRow["title"].ToString();
Response.Write(MyValue);
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
}
}
保護無效的button1_Click其中 「空缺」 是紅色VWD
你有2點額外的支撐在那裏,人們的Response.Write後,和一個你的按鈕單擊事件處理程序之前 – Wanabrutbeer