Salam...
I need to get value that has been selected from combobox ..
the values in combobox is taken from column's contents of one of tabel in database..so once i write if x=combobox.selectedvalue..i got error that i Additional information: Operator is not valid for type 'DataRowView' and string

Hi,

x=combobox.text

Loren Soth

Hi,

PHP is a server side web scripting language where you don't have direct access to client side web controls like text and combo boxes. What you should do is to put <input> tags in a <form action="POST"> tag with destination to another (to the same is also possible, slightly more complicated) PHP page where contents of the selected combobox item will be returned to the new PHP page as $_POST["nameofpostvar"] variable when submitted. On server side scripting each action requires a round trip to the server.

Loren Soth

Salam...
I need to get value that has been selected from combobox ..
the values in combobox is taken from column's contents of one of tabel in database..so once i write if x=combobox.selectedvalue..i got error that i Additional information: Operator is not valid for type 'DataRowView' and string

Hey sorry but i dont know the ans to your Q. yours was the first query that came around so ...just asking you
I just wanted to know how do you go about this site...i mean...if i wanted to post a Q about JAVA etc...you see its an informative site but its tough moving in here...how do i do it???? if you can help me out...really appreciate it!!! thank you!!!

In VB, the combobox's value can be retrieved several ways. x=combobox.selectedvalue will return a row like the error says. What intellisense doesn't tell you is that you can retrieve the information from this row using .Item(0) so x=combobox.selectedvalue.item(0) will give you the value including the type like integer, etc.

thank you all especailly to ZachMack who remind me of my first post here :D
and welcome to DaniWeb.

hi guys...i m new to coding and all ....can smone suggest me how to take values in list box and how to select an item(multiple selection also).....its important....please send me the code

i think its combobox.selecteditem.tostring

or like these combobox.selectedvalue.tosrting

This Will work for sure
TextBox2.Text = ComboBox1.Items(0)

Please do not resurrect old threads. If you have any questions, start your own thread.

Thread Closed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.