Space in mobile:list control trimed RRS feed

  • Question

  • User-1441169528 posted


    Has anyone experienced this problem?

    I am using the mobile:List control to list my data. My problem is how to allow 2 or more spaces allowed between each word?
    For example:
    I have a list control called list1, then I add an item,
    list1.Add.Items.Add("Hello      World!")
    The result I will see from my device or IE browser will display "Hello World!" only. The spaces are trimed. How to avoid this?

    I would appreciate your help...

    Tuesday, September 6, 2005 10:44 PM

All replies

  • User286710293 posted

    If you application for html ,Then you can using <table>.But if you application for wml,The maybe using "&nbsp;",but in this way can't perfection trimed!

    Friday, September 9, 2005 9:30 AM
  • User-1441169528 posted
    Thank you for your reply.

    By the way, I am not using html table or wml either.
    My problem is when adding a list item in the mobile:list control, I do somthing like:
    list1.Add.Items.Add("Hello      World!"), but the result in the browser is "Hello World!", the space trimed.
    It is impossible for the to put "&nbsp;" at the middle, else it will become:
    list1.Add.Items.Add("Hello &nbsp;&nbsp; World!"), and the result is "Hello &nbsp;&nbsp; World!".
    This is not what I wanted!

    Thanks again. Any other opinions?
    Sunday, September 11, 2005 9:56 PM
  • User342439244 posted

    did you try this ?

    paddingChar = Server.HtmlDecode("&nbsp;");

    Saturday, October 8, 2005 4:31 PM
  • User-1441169528 posted
    It works!!! Thank you very much.
    Sunday, October 9, 2005 10:06 PM