Hello
I have a dropdownlist that populates it's value with a sqldatasource from a field with datatype MONEY.
When I get the selectedvalue I'm using the code below but get the error below
System.NullReferenceException: Object reference not set to an instance of an object.
Dim myShippingCost As DropDownList = CType(Wizard1.FindControl("DropDownlist1"), DropDownList)
Dim myShippingCosts As Integer = CType(myShippingCost.SelectedValue.ToString, Integer)
any help would be welcome.
I have a dropdownlist that populates it's value with a sqldatasource from a field with datatype MONEY.
When I get the selectedvalue I'm using the code below but get the error below
System.NullReferenceException: Object reference not set to an instance of an object.
Dim myShippingCost As DropDownList = CType(Wizard1.FindControl("DropDownlist1"), DropDownList)
Dim myShippingCosts As Integer = CType(myShippingCost.SelectedValue.ToString, Integer)
any help would be welcome.