D
darrel
I keep getting a " Object reference not set to an instance of an object. "
I'm using Dreamweaver and rebuilding a few pages that were produced in
VS.net. The original page seems to work fine, the new one does not.
Here's the code in question:
If IsPostBack Then
Else
Dim CountyData As New DataSet()
Try
CountyData.ReadXml(MapPath("County.xml"))
DropDownListCounty.DataSource = CountyData
DropDownListCounty.DataValueField = "CountyNumber"
DropDownListCounty.DataTextField = "CountyName"
DropDownListCounty.DataBind()
Catch objError As System.Exception
response.write ("Error Loading County XML - Contact
Administrator.<br />" _
& objError.Message & "<br />" & objError.Source)
Exit Sub
End Try
I should know what the "Object reference not set to an instance of an
object." means, but I'm not sure what, specifically, the reference is. I
think I need to set "DropDownListCounty" to ian instance of a DropDownList?
I'm using Dreamweaver and rebuilding a few pages that were produced in
VS.net. The original page seems to work fine, the new one does not.
Here's the code in question:
If IsPostBack Then
Else
Dim CountyData As New DataSet()
Try
CountyData.ReadXml(MapPath("County.xml"))
DropDownListCounty.DataSource = CountyData
DropDownListCounty.DataValueField = "CountyNumber"
DropDownListCounty.DataTextField = "CountyName"
DropDownListCounty.DataBind()
Catch objError As System.Exception
response.write ("Error Loading County XML - Contact
Administrator.<br />" _
& objError.Message & "<br />" & objError.Source)
Exit Sub
End Try
I should know what the "Object reference not set to an instance of an
object." means, but I'm not sure what, specifically, the reference is. I
think I need to set "DropDownListCounty" to ian instance of a DropDownList?