Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
Server Error in '/MobileTimeTicket1' Application.
________________________________________
Object reference not set to an instance of an object.
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:
 
Line 68: mycon1.Close()
Line 69: da.Dispose()
Line 70: jobno.DataSource = ds
Line 71: jobno.DataTextField = "job_no"
Line 72: jobno.DataValueField = "job_no"
 
Source File: C:\Inetpub\wwwroot\MobileTimeTicket1\TimeTicket.aspx.vb Line: 70
 
Stack Trace:
 
[NullReferenceException: Object reference not set to an instance of an object.]
MobileTimeTicket1.TimeTicket1.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\MobileTimeTicket1\TimeTicket.aspx.vb:70
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.MobileControls.MobilePage.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
Posted 16-Nov-12 22:30pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

jobno is null - so when you try to retrieve jobno.DataSource it throws an exception.
 
You need to assign jobno to an instance (of whatever class it is declared as being), either with the New keyword, or by assigning an existing instance to it.
Since you code fragment doesn't show the declaration or any other uses, I can't be more specific.
  Permalink  
Comments
nityasri at 18-Nov-12 10:43am
   
@griff..thank u
OriginalGriff at 18-Nov-12 11:14am
   
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 369
1 Sergey Alexandrovich Kryukov 365
2 Maciej Los 285
3 George Jonsson 185
4 King_Fisher 160
0 Sergey Alexandrovich Kryukov 10,934
1 Maciej Los 5,614
2 OriginalGriff 5,603
3 CPallini 3,879
4 BillWoodruff 3,579


Advertise | Privacy | Mobile
Web02 | 2.8.141030.1 | Last Updated 17 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100