Tim Weaver

A .NET Blog

<October 2008>
SuMoTuWeThFrSa
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678


Navigation

Work

Subscriptions

Post Categories



Thursday, January 20, 2005 - Posts

ASP.NET Code Quiz
Given the following code snippet
  • What will be rendered?
  • Why?
  •    17         protected System.Web.UI.HtmlControls.HtmlTable testTable1;

       18         protected System.Web.UI.HtmlControls.HtmlTable testTable2;

       19        

       20         private void Page_Load(object sender, System.EventArgs e)

       21         {

       22             HtmlTableRow tr1 = new HtmlTableRow();

       23             HtmlTableCell cell = new HtmlTableCell("testCell");

       24             cell.InnerText = "Table Cell Inner Text";

       25             tr1.Cells.Add(cell);

       26  

       27             testTable2.Rows.Add(tr1);

       28             testTable1.Rows.Add(tr1);

       29         }

    Assume the controls are properly declared in the ASPX page

    posted Thursday, January 20, 2005 7:21 AM by icodemarine




    Powered by Dot Net Junkies, by Telligent Systems