I am fighting with the combo box and am almost ready to give up.
I need to be able to retrieve the values but it does not seem to work like the DropDownList Does... what am I doing wrong?
This part works fine
But this is throwing an error
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Source File: D:\Development\Visual Studio\xxxxxxx.com\App_Windows\Admin_Controls\Pages.ascx.vb Line: 101
I need to be able to retrieve the values but it does not seem to work like the DropDownList Does... what am I doing wrong?
This part works fine
Dim PagesDC As New Dal.icms_PagesDataContext |
Dim ParentPages = PagesDC.icms_Pages_GetParentPages() |
ddlParentPage.DataSource = ParentPages |
ddlParentPage.DataTextField = "MenuName" |
ddlParentPage.DataValueField = "ID" |
ddlParentPage.DataBind() |
ddlParentPage.Items.Insert(Nothing, New RadComboBoxItem("[main menu]")) |
But this is throwing an error
Protected Sub btnCreate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCreate.Click |
Dim _UserName As String = Page.User.Identity.Name |
Dim _isPublished As Boolean = False |
If chkPublished.Checked = True Then _isPublished = True |
Dim _ParentPage As Integer = Nothing |
If Convert.ToInt32(ddlParentPage.SelectedItem.Value) <> Nothing Then _ |
_ParentPage = Convert.ToInt32(ddlParentPage.SelectedItem.Value) |
Dim PagesDC As New Dal.icms_PagesDataContext |
Dim insert = PagesDC.icms_Pages_CreateNewPage(_ParentPage, _ |
RadComboBox1.SelectedItem.Value, _ |
txtMenuOrder.Text, _ |
txtMenuName.Text, _ |
txtTitle.Text, _ |
txtMetaKeywords.Text, _ |
txtMetaDescription.Text, _ |
_UserName, _ |
_isPublished) |
PagesDC.SubmitChanges() |
End Sub |
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
|
Source File: D:\Development\Visual Studio\xxxxxxx.com\App_Windows\Admin_Controls\Pages.ascx.vb Line: 101