LEAP8475J94CC and displaying in a textbox. However, i wish every letter would be displayed in a single
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit ChoudharyPosted Feb 18, 2010, 5:00 AM
Please use standard font size 2,3 and color for your posting. Don't use such a big large font size and such colors. it makes the posting awkword.
Help to maintain the dignity of the forum.
Amit ChoudharyPosted Feb 18, 2010, 4:28 AM
public void SpiltandCreateTable(string s)
{
Literal lt = new Literal();
lt.Text += "
foreach (char c in s)
{
lt.Text += "
}
lt.Text += "
// Now add this literal control to you page or at some custom place holder.
}
i hope now you can do it..
Don't forget to mark the answer if it helps you.
kiran kumarPosted Feb 18, 2010, 4:08 AM
check this code kevin
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string s = TextBox1.Text;
char[] spli = s.ToCharArray();
HtmlTable table1 = new HtmlTable();
table1.Border = 1;
HtmlTableRow row;
HtmlTableCell cell;
for (int i = 0; i < spli.Length; i++)
{
row = new HtmlTableRow();
cell = new HtmlTableCell();
cell.InnerHtml = "" + spli[i] + "";
row.Cells.Add(cell);
table1.Rows.Add(row);
}
this.Controls.Add(table1);
}
}
MARK THE ANSWER IT HELPED YOU