ASP.NET Rapid Evaluation Online

Bryan

Freshman
Joined
Jun 17, 2002
Messages
49
Location
Cedar Hill, TX
Ok, so I decided to learn ASP.net today. And I've been going through this rapid evalution online.

Here is the link: http://www.gotdotnet.com/team/vsrapideval/VBWeb/1_1.aspx

And so I go through the tutorial and try to run the webpage. I get this error:
<hr>
Server Error in '/WebApplication1' Application.<hr width="100%" size="1" color="silver">

Object reference not set to an instance of an object.

[font=Arial, Helvetica, Geneva, SunSans-Regular, sans-serif] Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

<table width="100%" bgcolor="#ffffcc"> <tbody><tr> <td> <code></code>

Line 34: dsOrders.ReadXml(Server.MapPath("CustOrder.xml"))
Line 35: If Not IsPostBack Then
Line 36: ddlCustomers.DataBind()
Line 37: txtStartDate.Text = OrderDateStart.SelectedDate.ToShortDateString
Line 38: txtEndDate.Text = OrderDateEnd.SelectedDate.ToShortDateString</pre> </td> </tr> </tbody></table>
Source File: c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb Line: 36

Stack Trace:

<table width="100%" bgcolor="#ffffcc"> <tbody><tr> <td> <code></code>

[NullReferenceException: Object reference not set to an instance of an object.]
WebApplication1.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:36
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
</pre> </td> </tr> </tbody></table>
<hr width="100%" size="1" color="silver"> Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

<hr>
Now, I know what the problem is, the drop down list is empty (null) and I wonder if the problem exists when I "save the dataset".

If you go to step 3 of the Bind Data section it tells you generate the dataset and then save the dataset.

I am able to generate the dataset by following the intructions given, but I don't know how to save the dataset. Is there something special I have to do? Is there some other reason I am getting this problem.

I know the XML file has the data in it. So the problem lies in getting the data out of the XML file and into the dataset.

Can anybody help me with this?
[/font]
 
Back
Top