HtmlSelect showing Value when Text is blank

Discussion in 'ASP .Net' started by Tom, Oct 9, 2007.

  1. Tom

    Tom Guest

    I have two ASP.NET (v1.1) websites running a modified version of the same
    code - they live on the same IIS6 server in separate virtual websites, with
    separate application pools.

    Each has exactly the same code for the population of a HtmlSelect control,
    where the HTML is as follows, and the codebehind populates the rest of the
    values.
    <select runat="server" id="selTitle">
    <option value="0"></option>
    </select>

    Here's the problem: one website (correctly) has the first item in the
    dropdown as blank text, and the other (incorrectly) has the text "0"... and
    I can find no reason what-so-ever why it is doing it.
    (I have also tried <option value="0">&nbsp;</option> without success.)

    I've checked and compared everything including IIS configuration,
    machine.config, web.config, project settings... I just can't figure it out.

    Any help would be very much appreciated.
    Cheers,
    Tom
    Tom, Oct 9, 2007
    #1
    1. Advertising

  2. View html source for both pages in browser and compare them. Most likely,
    there is a problem on server side and the resulting html are different.

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    "Tom" <> wrote in message
    news:g9POi.67386$...
    >I have two ASP.NET (v1.1) websites running a modified version of the same
    >code - they live on the same IIS6 server in separate virtual websites, with
    >separate application pools.
    >
    > Each has exactly the same code for the population of a HtmlSelect control,
    > where the HTML is as follows, and the codebehind populates the rest of the
    > values.
    > <select runat="server" id="selTitle">
    > <option value="0"></option>
    > </select>
    >
    > Here's the problem: one website (correctly) has the first item in the
    > dropdown as blank text, and the other (incorrectly) has the text "0"...
    > and I can find no reason what-so-ever why it is doing it.
    > (I have also tried <option value="0">&nbsp;</option> without success.)
    >
    > I've checked and compared everything including IIS configuration,
    > machine.config, web.config, project settings... I just can't figure it
    > out.
    >
    > Any help would be very much appreciated.
    > Cheers,
    > Tom
    >
    >
    Eliyahu Goldin, Oct 10, 2007
    #2
    1. Advertising

  3. Tom

    Tom Guest

    Thank you for your reply Eliyahu, but I now hang my head in shame.
    The problem was that it was running under ASP.NET 2.0 and not 1.1.

    After reading the following excellent article, it all became clear...
    http://weblogs.asp.net/owscott/arch...-without-forcing-an-upgrade-on-all-sites.aspx

    The server was running under 2.0 as standard, and the original website had
    been configured to use 1.1 specifically... something that hadn't been done
    to the new website.

    Tom


    "Eliyahu Goldin" <> wrote in
    message news:...
    > View html source for both pages in browser and compare them. Most likely,
    > there is a problem on server side and the resulting html are different.
    >
    > --
    > Eliyahu Goldin,
    > Software Developer
    > Microsoft MVP [ASP.NET]
    > http://msmvps.com/blogs/egoldin
    > http://usableasp.net
    >
    >
    > "Tom" <> wrote in message
    > news:g9POi.67386$...
    >>I have two ASP.NET (v1.1) websites running a modified version of the same
    >>code - they live on the same IIS6 server in separate virtual websites,
    >>with separate application pools.
    >>
    >> Each has exactly the same code for the population of a HtmlSelect
    >> control, where the HTML is as follows, and the codebehind populates the
    >> rest of the values.
    >> <select runat="server" id="selTitle">
    >> <option value="0"></option>
    >> </select>
    >>
    >> Here's the problem: one website (correctly) has the first item in the
    >> dropdown as blank text, and the other (incorrectly) has the text "0"...
    >> and I can find no reason what-so-ever why it is doing it.
    >> (I have also tried <option value="0">&nbsp;</option> without success.)
    >>
    >> I've checked and compared everything including IIS configuration,
    >> machine.config, web.config, project settings... I just can't figure it
    >> out.
    >>
    >> Any help would be very much appreciated.
    >> Cheers,
    >> Tom
    >>
    >>

    >
    >
    Tom, Oct 10, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Suhail A, Salman
    Replies:
    0
    Views:
    352
    Suhail A, Salman
    Aug 13, 2003
  2. =?Utf-8?B?Wm9vZG9y?=
    Replies:
    0
    Views:
    397
    =?Utf-8?B?Wm9vZG9y?=
    Nov 15, 2005
  3. =?Utf-8?B?Sm9l?=

    HtmlSelect control not showing ListItems

    =?Utf-8?B?Sm9l?=, Dec 14, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    658
    =?Utf-8?B?RGF2aWQgQnJhbmNo?=
    Dec 14, 2005
  4. Replies:
    1
    Views:
    1,579
    =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmE=?=
    Aug 25, 2006
  5. mirlisa
    Replies:
    2
    Views:
    387
    mirlisa
    Aug 29, 2006
Loading...

Share This Page