Ampersands being converted when in data that is bound to my ASP:Dropdown

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Ampersands being converted when in data that is bound to my ASP:Dropdown

    I am binding data to the <ASP:Dropdown> object. My field that I am binding
    to the DataTextField property has "&nbsp;" in the data out of the database.
    The problem that I am having is that when the page is rendered to the
    browser, the "&nbsp;" is changed to "&amp;nbsp;". Is there a way to stop
    the conversion of my data? What I am trying to accomplish is to have some
    drop down items to be tabbed in. So, if you know how to tab items in a
    dropdown, that can also solve my issue.


    --
    Brett Howard
    [email]bjhoward1@JoiMail.com[/email]


    Howard, Brett Guest

  2. Similar Questions and Discussions

    1. Using bound data in a query
      Hello- I have a Flash form that displays the "bound" contents of a field called "serviceIDs" when the user clicks on a record in a CFGRID (called...
    2. #38771 [NEW]: string POST data are converted to int
      From: satanas at tech-at dot be Operating system: Apache 10336100 PHP version: 4.4.4 PHP Bug Type: Unknown/Other Function...
    3. Templated Data-Bound Control Sample
      I have been attempting to create a templated data-bound control, using the sample as a guide...
    4. Combo Box Bound Data Question
      I have successfully set up variable data Combo Box via VBA with a Row Source Type of Table/Query which then uses a Row Source SQL command to...
    5. can't get data to show with bound columns
      I'm trying to create a DataGrid filled with values from a DataSet and I want the user to be able to show and hide whichever columns they choose. I...
  3. #2

    Default Re: Ampersands being converted when in data that is bound to my ASP:Dropdown

    Hi

    Assume the DropDownList ID is MenuList. The following code will add Space to
    the ListItem :

    MenuList.Items.Add(new
    ListItem(Server.HtmlDecode("&nbsp;&nbsp;UserGroup" ),"UserGroup"));



    HTH
    Prasad
    "Howard, Brett" <brett.howard@NOSPAMtroutmansanders.com> wrote in message
    news:eMJOTC8RDHA.2248@TK2MSFTNGP11.phx.gbl...
    > I am binding data to the <ASP:Dropdown> object. My field that I am
    binding
    > to the DataTextField property has "&nbsp;" in the data out of the
    database.
    > The problem that I am having is that when the page is rendered to the
    > browser, the "&nbsp;" is changed to "&amp;nbsp;". Is there a way to stop
    > the conversion of my data? What I am trying to accomplish is to have some
    > drop down items to be tabbed in. So, if you know how to tab items in a
    > dropdown, that can also solve my issue.
    >
    >
    > --
    > Brett Howard
    > [email]bjhoward1@JoiMail.com[/email]
    >
    >

    Prasad Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139