Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HtmlSelect showing Value when Text is blank

Reply
Thread Tools

HtmlSelect showing Value when Text is blank

 
 
Tom
Guest
Posts: n/a
 
      10-09-2007
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


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      10-10-2007
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" <(E-Mail Removed)> wrote in message
news:g9POi.67386$(E-Mail Removed)...
>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
>
>



 
Reply With Quote
 
 
 
 
Tom
Guest
Posts: n/a
 
      10-10-2007
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/archi...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" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:g9POi.67386$(E-Mail Removed)...
>>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
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Fetching Custom Attribute Value from HtmlSelect mirlisa ASP .Net 2 08-29-2006 03:49 PM
Setting HtmlSelect SelectedIndex using a value writebrent@gmail.com ASP .Net 1 08-25-2006 06:03 AM
HtmlSelect control not showing ListItems =?Utf-8?B?Sm9l?= ASP .Net 3 12-14-2005 09:40 PM
HtmlSelect value not available when using callback instead of post =?Utf-8?B?Wm9vZG9y?= ASP .Net 0 11-15-2005 09:36 AM
HtmlSelect control is not helping and client side coding became a real headache Suhail A, Salman ASP .Net 0 08-13-2003 10:38 AM



Advertisments