Saturday, August 21, 2010

How to print ASCII charactors in asp.net

<%@ Page Language="C#" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <script runat="server">
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            TableRow tr = new TableRow();
            int index = 0;
            for (int i = 31; i < 256; i++)
            {
                string text = string.Format("{0:000} - (&#{0})", i);
                if (index % 10 == 0)
                {
                    tr = new TableRow();
                    this.tblCharSet.Rows.Add(tr);
                }
                tr.Cells.Add(new TableCell() { Text = text });
                this.ddlCharactors.Items.Add(new ListItem(string.Format("{0:000}", i), i.ToString()));
                index++;
            }
        }     
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:DropDownList ID="ddlCharactors" runat="server" />
        <asp:Table runat="server" ID="tblCharSet" />
    </form>
</body>
</html>

No comments:

iPhone Launch Screen Sizes

iPhone Portrait iOS 8 Retina HT 5.5 = 1242 X 2208 Retna HD 4.7 = 750 X 1134 iPhone Landscape iOS 8 Retina HD 5.5  2208 X 1242 iPho...