Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I am creating website and sending email

I have this line in email msg body

SQL
mail.Body = "Hi, you got Job. Here are the details of passengers  " & vbCrLf & " " & vbCrLf & "Passenger name: " + Me.nameTextBox.Text + "" & vbCrLf & "" & vbCrLf & "  Phone number: " + Me.phoneTextBox.Text + "" & vbCrLf & " " & vbCrLf & "Booking date: " + Me.booking.Text + "" & vbCrLf & "" & vbCrLf & "" + "Passenger Pick-up details" & vbCrLf & "" + "  Unit/Flat numder: " + Me.unitTextBox.Text + "" & vbCrLf & " " & vbCrLf & "Street number: " + Me.stnumberTextBox.Text + "" & vbCrLf & "" & vbCrLf & " Street Name: " + Me.stnameTextBox.Text + "" & vbCrLf & " " & vbCrLf & "Suburb: " + Me.sbdrop.SelectedValue + "" & vbCrLf & "" & vbCrLf & " Building type: " + Me.radio1.SelectedValue + "" & vbCrLf & " " & vbCrLf & "" + "Passenger destination" & vbCrLf & "  Unit/Flat numder: " + Me.unit1.Text + "" & vbCrLf & " " & vbCrLf & "Street number: " + Me.stnumber1.Text + "" & vbCrLf & "" & vbCrLf & " Street Name: " + Me.stname1.Text + "" & vbCrLf & " " & vbCrLf & "Suburb: " + Me.sbdrop1.SelectedValue + "" & vbCrLf & "" & vbCrLf & "

Building type:" + Me.radio1.SelectedItem + "" & vbCrLf & "" & vbCrLf & ""


Above all line is together but i am facing error from Building type:" + Me.radio1.SelectedItem + so i put space in that line.

Its showing this message : Input string was not in a correct format.

[edit]Urgency deleted - OriginalGriff[/edit]
Posted
Updated 8-Dec-11 21:36pm
v3
Comments
OriginalGriff 9-Dec-11 3:36am    
Urgency deleted: It may be urgent to you, but it isn't to us. All that your stressing the urgency does is to make us think you have left it too late, and want us to do it for you. This annoys some people, and can slow a response.

1 solution

SelectedItem does not return a string: it returns a ListItem.

Try using SelectedValue instead.
 
Share this answer
 

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