|
using System;
using System.Data;
using System.Configuration;
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 System.ComponentModel;
namespace WebApplication
{
[DataObject(true)]
public class DataAdapter
{
/// <summary>
/// This method is called by the ObjectDataSource when the GridView is bound.
/// Therefore we return some dummy data sorted by the sort expression.
/// </summary>
/// <param name="sort">how the data should be sorted.</param>
/// <returns>Some data</returns>
[DataObjectMethod(DataObjectMethodType.Select, true)]
public DataDataSet GetData()
{
DataDataSet data = new DataDataSet();
data.Data.AddDataRow("hello", "asp.net", "world");
data.Data.AddDataRow("have", "fun", "!");
data.AcceptChanges();
return data;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.