Combo Box Choices Messed Up
I have a combo box that looks great in the designer, the list of choices are perfect. But when I view the ASP code, or the published webpage the choices are seriously garbled. I have tried adding items, but it does not seem to regenerate the code. Any ideas why it happened and what I should do? I do most of my editing through the designer GUI. Thanks!
Note the blank items and even items mixed up together: TVCricket
asp Code:
<asp:DropDownList ID="ddlFoundOut" runat="server">
<asp:ListItem Selected="True">(Pick how you found out about us)</asp:ListItem>
<asp:ListItem>Another Store</asp:ListItem>
<asp:ListItem>Banner at Arena</asp:ListItem>
<asp:ListItem>TVCricket</asp:ListItem>
<asp:ListItem>West NewsmagazineClear</asp:ListItem>
<asp:ListItem>Driving By</asp:ListItem>
<asp:ListItem>Friend/Co-worker</asp:ListItem>
<asp:ListItem>Internet</asp:ListItem>
<asp:ListItem>Mall Sign</asp:ListItem>
<asp:ListItem>Online Phone Book</asp:ListItem>
<asp:ListItem>Phonebook (paper)</asp:ListItem>
<asp:ListItem>Radio</asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem></asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
<asp:ListItem>Other Magazine</asp:ListItem>
<asp:ListItem>Other News Paper</asp:ListItem>
</asp:DropDownList>
Re: Combo Box Choices Messed Up
I don't see any syntax errors... Can you show a snapshot of what you mean by 'Garbled'
Re: Combo Box Choices Messed Up
Thread moved from 'ASP, VB Script' forum to 'ASP.Net' forum
Re: Combo Box Choices Messed Up
I agree with koolsid, there is nothing obviously standing out.
Have you got any code in the Code Behind page that is affecting the DropDownList, or do you do it all through the markup?
Gary
Re: Combo Box Choices Messed Up
Have you tried just fixing it in the markup?
Re: Combo Box Choices Messed Up
I have tried fixing it in the markup, and it works great. But if I try and use the Designer GUI builder everything gets messed up. I think I may have had the same problem in VS2008. Maybe I just click too quick for it to keep up with. I wish Microsoft would fix this issue.
Quote:
Originally Posted by
SeanGrebey
Have you tried just fixing it in the markup?
Re: Combo Box Choices Messed Up
Quote:
Originally Posted by
rex64
I have tried fixing it in the markup, and it works great. But if I try and use the Designer GUI builder everything gets messed up. I think I may have had the same problem in VS2008. Maybe I just click too quick for it to keep up with. I wish Microsoft would fix this issue.
Will it re-mess it up once you fix it, or will only new ones be messed up?
Re: Combo Box Choices Messed Up
Hey,
I am still not sure that I follow the issue that you are having?!?
Can you detail the steps that you take to reproduce the issue? See if we can replicate it.
Gary
Re: Combo Box Choices Messed Up
Sure. Basically I add about 10 elements. Then I add 5 more and re-arrange them with the up and down arrows quickly (very quickly with double, triple, and more clicks, I am happy clicker). After that I publish the page (or just look at the code) and some of the elements get combined into 1, and I end up with some blank elements.
Quote:
Originally Posted by
gep13
Hey,
I am still not sure that I follow the issue that you are having?!?
Can you detail the steps that you take to reproduce the issue? See if we can replicate it.
Gary
Re: Combo Box Choices Messed Up
Quote:
Originally Posted by
gep13
Hey,
I am still not sure that I follow the issue that you are having?!?
Can you detail the steps that you take to reproduce the issue? See if we can replicate it.
Gary
Look at the bolded lines, the designers mucking up his markup.
Code:
1.
<asp:DropDownList ID="ddlFoundOut" runat="server">
2.
<asp:ListItem Selected="True">(Pick how you found out about us)</asp:ListItem>
3.
<asp:ListItem>Another Store</asp:ListItem>
4.
<asp:ListItem>Banner at Arena</asp:ListItem>
5.
<asp:ListItem>TVCricket</asp:ListItem>
6.
<asp:ListItem>West NewsmagazineClear</asp:ListItem>
7.
<asp:ListItem>Driving By</asp:ListItem>
8.
<asp:ListItem>Friend/Co-worker</asp:ListItem>
9.
<asp:ListItem>Internet</asp:ListItem>
10.
<asp:ListItem>Mall Sign</asp:ListItem>
11.
<asp:ListItem>Online Phone Book</asp:ListItem>
12.
<asp:ListItem>Phonebook (paper)</asp:ListItem>
13.
<asp:ListItem>Radio</asp:ListItem>
14.
<asp:ListItem></asp:ListItem>
15.
<asp:ListItem></asp:ListItem>
16.
<asp:ListItem>Other</asp:ListItem>
17.
<asp:ListItem>Other Magazine</asp:ListItem>
18.
<asp:ListItem>Other News Paper</asp:ListItem>
19.
</asp:DropDownList>
Re: Combo Box Choices Messed Up
Why not delete it and manually type those instead doing it from the designer? Or am I missing something here?
Re: Combo Box Choices Messed Up
Yes, I already fixed it that way. But I was just curious if there is anything I can do to fix the designer? Or should I click slower? Is there a work around? Is there a way to get ASP to automatically rebuild the code?
Quote:
Originally Posted by
koolsid
Why not delete it and manually type those instead doing it from the designer? Or am I missing something here?
Re: Combo Box Choices Messed Up
Doh, now I see what you are saying.
Didn't catch that one :)
If I were you, I would submit this as a bug directly to Microsoft, and see if there is something that they can suggest.
Gary