I have a database that contain a table called ResourceInfo
.
Inside ResourceInfo
, there are 2 columns - resourcetype
and description
.
There is a global variable protected List<String> ResourceType = new List<String>();
that will actually and eventually get pass to the ASPX file's javascript.
The following is the C# code.
How do I store the data from the 2 columns into the variable ResourceType
?
if (caltab.HasRows)
{
while (caltab.Read())
{
ArrayList txtval = (ArrayList)[caltab["resourcetype"], caltab["description"]];
ResourceType.Add(txtval);
}
}