473,422 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,422 software developers and data experts.

easy one I think! Property not recognised in HTML view

Hi there. I am a little confused. SelectedValue is a property of ListBox and
dropdownlist. However it isnt in the list of properties in intellisence (html
view i am not talking about code behind where it does list it). So when I
create my asp:ListBox and try to set SelectedValue=(to a databind value) it
has a squiggly line under it and says 'not recognised property of list box'.
The thing is, it works, so i have ignored it, but I would quite like to know
why this happens? Is it something I've missed?

Thanks.
Nov 19 '05 #1
2 1567
Louise,

<asp:ListBox id="ListBox1" runat="server">
<asp:ListItem Value="test1">test1</asp:ListItem>
<asp:ListItem Value="test2" Selected="True">test2</asp:ListItem>
<asp:ListItem Value="test3">test3</asp:ListItem>
</asp:ListBox>

forums, articles, news -> www.ProjectThunder.com

-Calvin Luttrell
"louise raisbeck" <lo************@discussions.microsoft.com> wrote in message news:B6**********************************@microsof t.com...
Hi there. I am a little confused. SelectedValue is a property of ListBox and
dropdownlist. However it isnt in the list of properties in intellisence (html
view i am not talking about code behind where it does list it). So when I
create my asp:ListBox and try to set SelectedValue=(to a databind value) it
has a squiggly line under it and says 'not recognised property of list box'.
The thing is, it works, so i have ignored it, but I would quite like to know
why this happens? Is it something I've missed?

Thanks.

Nov 19 '05 #2
hi thanks calvin. I know that you can set an individual list item to be
selected, my question was more that if it works anyway, why does it put the
squiggly line under it in html view (I am setting the selectedvalue to a
datalist databind item), so in the definition of the dropdownlist i have

SelectedValue='<%# DataBinder.Eval(Container.DataItem,
"genderid").ToString() %>'

It works, but always underlines 'SelectedValue'. SelectedValue IS a property
of Dropdownlist, so why doesnt it like it?

Thanks and happy new year.

"Calvin Luttrell" wrote:
Louise,

<asp:ListBox id="ListBox1" runat="server">
<asp:ListItem Value="test1">test1</asp:ListItem>
<asp:ListItem Value="test2" Selected="True">test2</asp:ListItem>
<asp:ListItem Value="test3">test3</asp:ListItem>
</asp:ListBox>

forums, articles, news -> www.ProjectThunder.com

-Calvin Luttrell
"louise raisbeck" <lo************@discussions.microsoft.com> wrote in message news:B6**********************************@microsof t.com...
Hi there. I am a little confused. SelectedValue is a property of ListBox and
dropdownlist. However it isnt in the list of properties in intellisence (html
view i am not talking about code behind where it does list it). So when I
create my asp:ListBox and try to set SelectedValue=(to a databind value) it
has a squiggly line under it and says 'not recognised property of list box'.
The thing is, it works, so i have ignored it, but I would quite like to know
why this happens? Is it something I've missed?

Thanks

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chris | last post by:
Our company developed the last couple of years a development tool: using this tool we configure and program (using SQL, and Java-Script) very, very easy an application. The output of the effort is...
50
by: jbailo | last post by:
Subject: dotnet is a farce. You know, I was always impressed with the way one could write a http program with c# or java. To me, it showed how 'superior' these languages are because they made...
3
by: Bruce Duncan | last post by:
I know this has to be easy, but I can't seem to figure it out. I'm debuggin' someone elses code... x="hello"; +x+"world" ....and I don't get it! What does the "+x+"world" do? If I alert(x)...
8
by: Adam Clauss | last post by:
I have a folder containing many subfolders (and subfolders and....) all containing various .cs files. Is there any "easy" way to get them all added to the solution. Preferable would be that the...
10
by: Brian | last post by:
Hello all, I have an form to Enter a Name with letters from A to Z in buttons. When you click a button, it should append the text associated with that button to a text box. Instead of...
1
by: Adjo | last post by:
Okay, I've seen all the examples of using comboboxes on webforms when using simple values. And in the issue-tracker starterkit there is a way to use comboboxes with id/value foreign keys in a smart...
13
by: Ghislain Tanguay | last post by:
I have a compiled vb.net app and I want to give the user a choice to launch it from the start line command and pass it a parameter or not. How can I do that in my code? Is it possible? Ex. :...
1
by: Alex | last post by:
Hi I'm wondering if there is an easy way to analize log files in php? I'm sure there is a program somethere on the internet. If anyone can point me to one it would be great. I have a log file...
10
by: erokar | last post by:
Which tools would you use? I want the interface design to be as easy and fast as possible, all ideology aside. I'm considering either IronPython+Visual Studio or Python+Qt -- but I'm open for other...
25
by: Andy B | last post by:
How hard/easy is it to use/learn VB compared to c#?
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.