- 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. */
- Give three methods of an ArrayList control.
Ans: Add, Insert, RemoveAt
- Copy the 12th item of the ArrayList control col to
the TextBox object txtDisplay.
txtDisplay.Text = col[12];
- Write the ASP.Net XML code for this Table object:
<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>
- 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;