Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have a radiobuttonlist which is databinded. I want to display an item name and its price in this. when I combine these fields using query, it shows an error regarding datatype mismatch.Itemname is in varchar and price is in float. Is there any method to display these 2 fields together.
I want to display like this:
Itemname(Rs.100)

Thank you....
Posted
Updated 18-Oct-12 0:40am
v2
Comments
AshishChaudha 18-Oct-12 6:06am    
Have you tried something??
AshishChaudha 18-Oct-12 7:00am    
Give error in your query??
[no name] 18-Oct-12 7:02am    
Neha, did you improved your question or changed it entirely? if you have new query pls pls pls post a new question. Do you want to know why so?

Because all three solutions provided by other users are looking out of context now. this will confuse people who will refer this post for the same query. I request you to post a new question.
_Amy 19-Oct-12 1:38am    
You improved your question and changed entire content? Improve Question link is given to improve the question if any thing missed out. It is not there to change the whole question. Don't misguide the dev's out here.

Neha, did you improved your question or changed it entirely? if you have new query pls pls pls post a new question. Do you want to know why so?

Because all three solutions provided by other users are looking out of context now. this will confuse people who will refer this post for the same query. I request you to post a new question.
 
Share this answer
 
Yes, it'll show the error. If you'll try to add/concatenate two different data types values it'll throw data type mismatch error.

I would suggest you to convert your item price in string format before concatenating it. You can use Javascript toString()[^] function to convert the values in string format..

  --Amit
 
Share this answer
 
v2
There are two properties
SelectedValue and SelectedItems

you can use any of these two.
 
Share this answer
 
in VB.NET:

dim retunval = rdTestRadioButton.SelectedValue
 
Share this answer
 
v2
C#
Decimal price = rdTestRadioButton.SelectedValue;
String item = rdTestRadioButton.SelectedItems.ToString();
 
Share this answer
 
Comments
Divya RS 18-Oct-12 8:12am    
whats your problem exactly , to display values in radiobutton or to get value fromt ham, pls provide your code

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900