create your user control using the vs.net designer, then create an html table having 3 by 3 cells, give them the colors appropriately. create a public property in the user control for the array list as follows :
your usercontrol code behind :
public class myUserControl
{
private ArrayList _myArrayList;
public ArrayList myArrayList
{
get
{
return _myArrayList;
}
set
{
_myArrayList = value;
}
}
} register the usercontrol to the code behind so that you can reach the public properties
myUserControl myUserControlIDonthepage;
when you add the usercontrol to the page, you can fill the array list in the page load event of the page as follows :
void Page_Load(object sender, EventArgs e)
{
myUserControlIDonthepage.myArrayList.Add(myValue);
} then you can display the items in the arraylist in the html table in usercontrol as follows :
<table>
<tr><td><%=myArrayList[0].ToString()%></td></tr>
</table> you do that 9 times till you fill all the table with appropriate values
serkan sendur
Postaholic
Banned
2,062 posts since Jan 2008
Reputation Points: 854
Solved Threads: 127