| <html> <script language="VB" runat=server> Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs) ArrayItems.Add("One") ArrayItems.Add("Two") ArrayItems.Add("Three") MyList.DataSource = ArrayItems MyList.DataBind() End Sub </script> <body> <object id="ArrayItems" class="System.Collections.ArrayList" runat=server/> <asp:datalist id="MyList" runat=server> <ItemTemplate> Here is a value: <%# Container.DataItem %> </ItemTemplate> </asp:datalist> </body> </html> |
| <html> <body> The below content has been hidden from browser clients using a server-side comment (view the .aspx source to see what we mean :-) <%-- <asp:calendar id="MyCal" runat=server/> <% For I = 0 To 44 %> Hello World <br> <% Next %> --%> </body> </html> |
| <html> <body> <!-- #Include File="Header.inc" --> <br /> <h3> Main page content </h3> <br /> <!-- #Include File="Footer.inc" --> </body> </html> |
| <asp:SqlDataSource ID="SqlDataSource1" ConnectionString='<%$ connectionStrings:Pubs %>' runat="server" SelectCommand="sp_GetAuthors" /> <asp:Label ID="Label1" Text='<%$ Resources: ExchRate, ConvertLabel %>' runat="server"/> |