我是 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)
{
}
}
protected void Button1_Click,其中“void”在 vwd 中带有红色下划线