why dont you create a small XML file and bind to it automatically as you
would a database?
Alternatively, to build your own from your data use the code below, dont
forget to look into caching to get the best advantags of data rarely
changing
private DataTable CreateDataSource()
{
DataTable dt = new DataTable();
dt.Columns.Add("LastName", Type.GetType("System.String"));
dt.Rows.Add(new object[] {"Smith"});
dt.Rows.Add(new object[] {"Jones"});
dt.Rows.Add(new object[] {"Clark"});
return dt;
}
private void Page_Init(object sender, EventArgs e)
{
InitializeComponent();
DataList1.AlternatingItemTemplate =
Page.LoadTemplate("NewTemplate.ascx");
}
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
if (!Page.IsPostBack)
{
DataList1.DataSource = CreateDataSource();
DataList1.DataBind();
}
}
--
Regards
John Timney
ASP.NET MVP
Microsoft Regional Director
"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:uB**************@TK2MSFTNGP14.phx.gbl...
I have several pieces of information (about 20 rows) that I would like to
put in a DataSet to make them easier to use in my application. Because it
is very little data, I would prefer not to make a database for such little
data that will very rarely be changed. However, everything I have been able
to find only uses DataSets for connecting to databases. Is it possible to
put data into a DataSet without using a database? Any help would be
appreciated. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/