473,320 Members | 1,904 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,320 software developers and data experts.

Error with DropDownList

Can someone please tell me why I can use selectedvalue but not selecteditem
in the following piece of code and how do I get around it???

Thanks...

Error...
Operator "&" is not defined for type "String" and
system.web.ui.webcontrols.listitem
Code...
Dim sMsg As String
sMsg += "Office : " & ddlOffName.SelectedItem & vbCrLf
Nov 19 '05 #1
1 1040
Tim are u looking for Value or Text
Try going through:-
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwebuiwebcontrolsdropdownlistclasstopic. asp
Hope that helps
Patrick

"Tim::.." <myatix_at_hotmail.com> wrote in message
news:9F**********************************@microsof t.com...
Can someone please tell me why I can use selectedvalue but not selecteditem in the following piece of code and how do I get around it???

Thanks...

Error...
Operator "&" is not defined for type "String" and
system.web.ui.webcontrols.listitem
Code...
Dim sMsg As String
sMsg += "Office : " & ddlOffName.SelectedItem & vbCrLf

Nov 19 '05 #2

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

Similar topics

0
by: Michelle Keys | last post by:
Subject: DataBinder.Eval Error! Server Error in '/MSPOS' Application. ------------------------------------------------------------------------ -------- DataBinder.Eval:...
0
by: Shane O. Pinnell | last post by:
I am sure this has come up before, but I haven't been able to find an answer as of yet. That said, any help is definitely appreciated! I have a datagrid populated from a dataset. I have a...
1
by: Aaron Prohaska | last post by:
I'm having the problem with this drop down list on postback. For some reason both the ListItems get selected when I change the selected item. Using the code below I'm building the drop down list in...
6
by: Teep | last post by:
Below is my code for dropdownlist that is populated from a SQL table. After a selection from the ddl, a datagrid is suppose to come up pertaining to the information selected, but I keep getting a...
3
by: Sean | last post by:
HI There, I am trying to submit a form when a selection is made from a dropdown list, I keep getting the error "Handles clause requires With Events Variable". Could someone help me with the...
1
by: Luis Esteban Valencia | last post by:
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source...
2
by: Ben | last post by:
Hi, In the code-behind, i can refer to the dropdownlist defined in the aspx file with this (e.g.) dropdownlist1.sekectedvalue = ... but why can i not refer to the label defined in the...
0
by: pabloazorin | last post by:
I developed a Date Picker web control using C# and .net framework 1.1 I added my control to Visual Studio 2003 IDE toolbar. When I drag and drop my control to design web page, the control renders...
6
by: shror | last post by:
I need your help please in an aspx webpage. I have 2 combo boxes in the page The first combo load and when i select item from it then the other combo should be loaded then and this cenario work...
6
by: Ahmedhussain | last post by:
Hi there, I m doing work on a gridview and Im getting an error: A potentially dangerous Request.Form value was detected from the client (ctl00$Content$GridView1$ctl03$TextBox1="<span...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.