i have an ASP.NET
Solution:
Add instead of space character, and HtmlDecode all elements after binding :
DropDownList
control that retrieves the first and last name from a column in the database. Instead of having just one space between the first and last name, I want there to be three. How do I add the extra spaces between the two pieces of text in the DropDownList
?
Solution:
Add instead of space character, and HtmlDecode all elements after binding :
string[] items = new string[] {
"name& nbsp;& nbsp;& nbsp;surname1",
"name& nbsp;& nbsp;& nbsp;surname2" };
ddl.DataSource = items;
ddl.DataBind();
foreach (ListItem item in ddl.Items)
{
item.Text = HttpUtility.HtmlDecode(item.Text);
}
No comments:
Post a Comment