<bdo id='AuG7Y'></bdo><ul id='AuG7Y'></ul>
  • <i id='AuG7Y'><tr id='AuG7Y'><dt id='AuG7Y'><q id='AuG7Y'><span id='AuG7Y'><b id='AuG7Y'><form id='AuG7Y'><ins id='AuG7Y'></ins><ul id='AuG7Y'></ul><sub id='AuG7Y'></sub></form><legend id='AuG7Y'></legend><bdo id='AuG7Y'><pre id='AuG7Y'><center id='AuG7Y'></center></pre></bdo></b><th id='AuG7Y'></th></span></q></dt></tr></i><div id='AuG7Y'><tfoot id='AuG7Y'></tfoot><dl id='AuG7Y'><fieldset id='AuG7Y'></fieldset></dl></div>

    <small id='AuG7Y'></small><noframes id='AuG7Y'>

    1. <legend id='AuG7Y'><style id='AuG7Y'><dir id='AuG7Y'><q id='AuG7Y'></q></dir></style></legend>
      <tfoot id='AuG7Y'></tfoot>

        在列表框中的字符之间插入空格

        Insert whitespace between characters in listbox(在列表框中的字符之间插入空格)

                  <bdo id='cDL7G'></bdo><ul id='cDL7G'></ul>
                  <i id='cDL7G'><tr id='cDL7G'><dt id='cDL7G'><q id='cDL7G'><span id='cDL7G'><b id='cDL7G'><form id='cDL7G'><ins id='cDL7G'></ins><ul id='cDL7G'></ul><sub id='cDL7G'></sub></form><legend id='cDL7G'></legend><bdo id='cDL7G'><pre id='cDL7G'><center id='cDL7G'></center></pre></bdo></b><th id='cDL7G'></th></span></q></dt></tr></i><div id='cDL7G'><tfoot id='cDL7G'></tfoot><dl id='cDL7G'><fieldset id='cDL7G'></fieldset></dl></div>
                    <tbody id='cDL7G'></tbody>
                • <small id='cDL7G'></small><noframes id='cDL7G'>

                  <legend id='cDL7G'><style id='cDL7G'><dir id='cDL7G'><q id='cDL7G'></q></dir></style></legend>
                  <tfoot id='cDL7G'></tfoot>
                  本文介绍了在列表框中的字符之间插入空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试将项目插入到我的 asp.net C# 应用程序的列表框中

                  I am trying to insert items into a listbox in my asp.net C# application

                  我连接了一些值并在它们之间放置了空格,但它没有显示在列表框中.

                  I concatenate some values and put whitespace in between them but it doesn't show up in the listbox.

                          ListItem lt = new ListItem();
                          lt.Text = ItemName + "    " + barcode + "    " + price; // problem
                          lt.Value = barcode;
                          lstMailItems.Items.Add(lt);
                  

                  我什至尝试过

                  lt.Text = ItemName + "		" + barcode + "		" + price; // problem
                  lt.Text = ItemName + "& nbsp;" + barcode + "& nbsp;" + price; // &nbsp shows up as text
                  

                  但这似乎不起作用.如何在这些字符串之间放置空格,以便它也显示在列表框中

                  but that even doesn't seem to work. How can I put whitespace between these strings so that it shows up in the listbox as well

                  推荐答案

                  string spaces = Server.HtmlDecode("&nbsp;&nbsp;&nbsp;&nbsp;"); 
                  
                  lt.Text = ItemName + spaces + barcode + spaces + price; // works
                  

                  这篇关于在列表框中的字符之间插入空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Populate ListBox with a IEnumrable on another thread (winforms)(在另一个线程(winforms)上使用 IEnumrable 填充 ListBox)
                  listbox selected item give me quot; System.Data.DataRowViewquot; , C# winforms(列表框选择的项目给我quot;System.Data.DataRowView, C# Winforms)
                  Cannot remove items from ListBox(无法从列表框中删除项目)
                  Preventing ListBox scrolling to top when updated(更新时防止列表框滚动到顶部)
                  Drag and drop from list to canvas on windows phone with MVVM(使用 MVVM 在 Windows 手机上从列表拖放到画布)
                  Deselection on a WPF listbox with extended selection mode(具有扩展选择模式的 WPF 列表框上的取消选择)
                    <tbody id='lBiLl'></tbody>
                          <bdo id='lBiLl'></bdo><ul id='lBiLl'></ul>

                            <i id='lBiLl'><tr id='lBiLl'><dt id='lBiLl'><q id='lBiLl'><span id='lBiLl'><b id='lBiLl'><form id='lBiLl'><ins id='lBiLl'></ins><ul id='lBiLl'></ul><sub id='lBiLl'></sub></form><legend id='lBiLl'></legend><bdo id='lBiLl'><pre id='lBiLl'><center id='lBiLl'></center></pre></bdo></b><th id='lBiLl'></th></span></q></dt></tr></i><div id='lBiLl'><tfoot id='lBiLl'></tfoot><dl id='lBiLl'><fieldset id='lBiLl'></fieldset></dl></div>

                            <legend id='lBiLl'><style id='lBiLl'><dir id='lBiLl'><q id='lBiLl'></q></dir></style></legend>

                          • <tfoot id='lBiLl'></tfoot>
                          • <small id='lBiLl'></small><noframes id='lBiLl'>