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:

Azure Storage Account Types

Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...