To Lecture Notes

IT130 Notes -- 5/20/09

Review Questions

  1. Give four different ways of marking source code comments in an .aspx file. Ans:
    <!-- This is a client-side HTML comment. --%gt;
    
    <%-- This is a server-side comment. --%>
    
    // This is a C# or JavaScript comment.  
    // The whole line is commented out.
    
    /* This is a CSS comment
       It also works in C# and JavaScript. */
    
  2. Give three methods of an ArrayList control.
    Ans: Add, Insert, RemoveAt
     
  3. Copy the 12th item of the ArrayList control col to the TextBox object txtDisplay.
  4. Write the ASP.Net XML code for this Table object:
     
    abc def
    hij klm
    <asp:Table ID=Table1 runat=server>
        <asp:TableRow runat=server>
            <asp:TableCell runat=server>abc</asp:TableCell>
            <asp:TableCell runat=server>def</asp:TableCell>
        </asp:TableRow>
        <asp:TableRow runat=server>
            <asp:TableCell runat=server>hij</asp:TableCell>
            <asp:TableCell runat=server>klm</asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    
  5. Write C# code that will append the text in Row 1, Column 0 of the table in Problem 2 to the literal control litDisplay.
    litDisplay.Text += Table1.Rows[1].Cells[0].Text;
    

 

More SQL Statements

 

More Database Examples

 

Practice Problem