Z
Z3Stealth
I am trying to create an app that will be able to grab data from many
different databases, and combine that data into one page. I do not know at
design time how many servers I will need to connect to, that information is
collected at runtime by reading a configuration file. What I want to do is
display the data from each server in a separate datagrid on my web form. I
tried to accomplish this by creating an array of DataGrid controls, and
assigning the data from each server to a different object in the array. I am
attempting to display the datagrid with the following code:
<%
for (int i = 0; i < NumServers; i++)
{
Response.Write("<aspataGrid ID=\"dgrData[");
Response.Write("i");
Response.Write("]\" HorizontalAlign=\"Center\" CellPadding=\"3\"
Runat=\"server\" /><br>");
}
%>
This approach does not seem to be working, as Response.Write writes the
<aspataGrid ...> tag, and doesn't actually process it to create the
DataGrid. Is there a way to display DataGrids when I don't know how many
there will be?
different databases, and combine that data into one page. I do not know at
design time how many servers I will need to connect to, that information is
collected at runtime by reading a configuration file. What I want to do is
display the data from each server in a separate datagrid on my web form. I
tried to accomplish this by creating an array of DataGrid controls, and
assigning the data from each server to a different object in the array. I am
attempting to display the datagrid with the following code:
<%
for (int i = 0; i < NumServers; i++)
{
Response.Write("<aspataGrid ID=\"dgrData[");
Response.Write("i");
Response.Write("]\" HorizontalAlign=\"Center\" CellPadding=\"3\"
Runat=\"server\" /><br>");
}
%>
This approach does not seem to be working, as Response.Write writes the
<aspataGrid ...> tag, and doesn't actually process it to create the
DataGrid. Is there a way to display DataGrids when I don't know how many
there will be?