1
내 데이터베이스에서 gridview 정보를 가져 오려고합니다. 나는 다음과 같은했지만 작동하지 않는 경우 어떻게이 방법으로 데이터 세트를 선언하는 나는 확실하지 오전 :ASP.NET 서비스 DataSet 선언
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace ConsumeDSetService
{
public partial class _Default : System.Web.UI.Page
{
public class MyDataSet
{
public static DataSet ds;
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
localhost.Service1 myws = new localhost.Service1();
ds = myws.GetDataSet();
GridView1.DataSource = ds;
GridView1.DataBind();
}
}
}