if i execute this code it show some symbols and numericals?

Posted by Sudheep.grandhe under C# on 11/30/2011 | Points: 10 | Views : 883 | Status : [Member] | Replies : 1
Hi,

If i execute this code it shows some symbols and numericals.i want to display in the textbox numericals with percentage symbol(eg:2.5%).only.but it display some special symbols.please do the needful.

private void VATUpdate_Load(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection("data source=mars-104;initial catalog=marsweb;integrated security=true");
conn.Open();
DataSet ds = new DataSet();
SqlDataAdapter da1 = new SqlDataAdapter("select * from tbl_vat", conn);
da1.Fill(ds);
foreach (DataRow row in ds.Tables[0].Rows)
{
for (int i = 0; i < ds.Tables[0].Columns.Count; i++)
{
txt_VAT.Text += row[i].ToString() + Environment.NewLine;
txt_VAT.Text += Environment.NewLine;
}
}

Output:i am not able to display the special symbols here.but i will explain symbols those are squareshape boxes

1

2.2

Best,
Sudheep.



Responses

Posted by: Arefin on: 11/30/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

Use RichTextBox control. I think, your problem will be solved.

Thanks,
Arefin

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response