Hello,
I am having problems getting the value selected from the combo box. I assume the code would be the same as a regular asp:DropDownList?
I get the error: Value of type 'String' cannot be converted to 'Telerik.Web.UI.RadComboBox'
I am having problems getting the value selected from the combo box. I assume the code would be the same as a regular asp:DropDownList?
I get the error: Value of type 'String' cannot be converted to 'Telerik.Web.UI.RadComboBox'
<telerik:RadComboBox ID="Title" runat="server" |
ToolTip="Please enter your title" Skin="WebBlue" Text="Title" |
> |
<Items> |
<telerik:RadComboBoxItem runat="server" Text="Mr" Value="Mr" /> |
<telerik:RadComboBoxItem runat="server" Text="Mrs" Value="Mrs" /> |
<telerik:RadComboBoxItem runat="server" Text="Miss" Value="Miss" /> |
<telerik:RadComboBoxItem runat="server" Text="Ms" Value="Ms" /> |
<telerik:RadComboBoxItem runat="server" Text="Dr" Value="Dr" ToolTip="Please give your title" /> |
<telerik:RadComboBoxItem runat="server" Text="Prof" Value="Prof" /> |
</Items> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
</telerik:RadComboBox> |
Imports System.Net.Mail |
Imports System.Net |
Partial Class fastquote_Default |
Inherits System.Web.UI.Page |
Protected Sub SendEmail_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) |
' !!! UPDATE THIS VALUE TO YOUR EMAIL ADDRESS |
Const ToAddress As String = "me@gmail.com" |
Dim mm As New MailMessage() |
' (2) Assign the MailMessage's properties |
mm.Subject = "GetAQuote" |
mm.IsBodyHtml = True |
mm.Body = ("" & (HttpUtility.HtmlEncode(Title.SelectedItem.Value) & "")) |
Dim smtp As New SmtpClient() |
' (4) Send the MailMessage (will use the Web.config settings) |
smtp.Send(mm) |
End Sub |
End Class |