Page 5 of 5 First ... 345
  • Jump to page:
    #61
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Dec 2011
    Posts
    2
    Rep Power
    0

    hi


    Originally Posted by Shadow Wizard
    Where is "urlLabel" defined in the .ASPX markup? Please show us the code.
    If it's inside repeater, you can't find it like this.
    yes its inside form view

    i try the other way its work in my pc but not in the domain
    Public v1 As String

    Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim g As New DataSet1TableAdapters.tb1TableAdapter
    v1 = g.ScalarQuery()

    End Sub

    End Class


    in aspx markup

    <iframe src="<%=v1%>"
    id="fram1"></iframe>
  2. #62
  3. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Dec 2011
    Posts
    1
    Rep Power
    0
    hello, i also get the System.NullReferenceException: Object reference not set to an instance of an object. in my code

    i declare two classes:

    Code:
        Public Class Boardsquare
            Public Occupied As Boolean
            Public Selected As Boolean
            Public Content As New Piece
            Sub New()
                Occupied = Nothing
                Selected = Nothing
                Content = Nothing
            End Sub
            Public Sub Clear()
                Occupied = False
                Selected = False
                Content.Clear()
            End Sub
        End Class
    
        Public Class Piece
            Public PcTeam As String
            Public PcName As String
            Public PcCode As String
            Public PcKills As Integer
            Public PcXCoor As Integer
            Public PcYCoor As Integer
            Sub New()
                PcCode = " "
                PcName = " "
                PcTeam = " "
                PcKills = 0
            End Sub
            Public Sub Clear()
                PcTeam = " "
                PcName = " "
                PcCode = " "
                PcKills = 0
                PcXCoor = -2
                PcYCoor = -2
            End Sub
        End Class
    and declare a TWO DIMENSIONAL variable of type "Boardsquare"
    Code:
        Public board(,) As Boardsquare = New Boardsquare(8, 8) {}
    but when i call the function to assign values to board:
    Code:
            While ctx < 8
                While cty < 8
    
                    board(ctx, cty).Content.PcCode = " "
    
                    board(ctx, cty).Content.PcName = " "
    
                    board(ctx, cty).Content.PcTeam = " "
    
                    board(ctx, cty).Content.PcKills = 0
    
                    cty = cty + 1
                End While
                ctx = ctx + 1
            End While
    i get this error: System.NullReferenceException: Object reference not set to an instance of an object.

    i use two dimensional arrays since im building an 8x8 game board.

    please help
  4. #63
  5. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2925
    You need to create each instance before you can use it:
    Code:
        board(ctx, cty) = New BoardSquare()
        board(ctx, cty).Content.PcCode = " "
        '......

    Comments on this post

    • cloudburst agrees : thanks
  6. #64
  7. No Profile Picture

    Join Date
    Dec 2012
    Posts
    25
    Rep Power
    0
    There is a possible solution. So I have to work on another computer application, I know the case of Windows XP I, they gave me this error.

    If you before this error:

    "I was not able to access the metabase

    And fixed (command line)

    aspnet_regiis -ga IUSR_<computername>
    aspnet_regiis -ga IWAM_<computername>

    .. and subsequently you get the "Object reference ..." error

    then the fix is to run (at the command prompt)

    aspnet_regiis -i

    I don't know why this problem only occurred on one of my machines. Anyway it seems to be a common problem so I thought I'd post my solution as an alternative. I hope it helps someone.

    Hire .Net Developer
  8. #65
  9. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jul 2013
    Posts
    1
    Rep Power
    0
    Hi. I joined because I can't find an answer to my problem and I hoped that someone might be able to help me solve a problem. I am not a developer. The message I am receiving "object reference not set to an instance of an object" pops up when I am using Sage Act Pro 2011, an off-the-shelf CRM program. I get the error message when I click on one of my contact's email address. The way Act works, when I click the email address it should automatically initiate a Microsoft Outlook email form for me to complete. A record of the email is saved within Act once I send the email from Outlook.

    Since both Act and Outlook are applications I have purchased, I can't use any of the programming suggestions offered in earlier posts. Can anyone help me figure out how to solve this problem? Thanks in advance for your assistance.
Page 5 of 5 First ... 345
  • Jump to page:

Similar Threads

  1. error: object reference not set to an instance of an object
    By aliaga61 in forum .NET Development
    Replies: 4
    Last Post: January 11th, 2005, 11:25 AM
  2. Replies: 0
    Last Post: August 20th, 2004, 07:18 AM
  3. Error: Object reference not set to an instance of an object.
    By zappa_justin in forum .NET Development
    Replies: 6
    Last Post: July 30th, 2004, 01:39 PM
  4. Error - Object reference not set to an instance of an object
    By ajegopinath in forum .NET Development
    Replies: 0
    Last Post: April 27th, 2004, 11:28 PM
  5. Replies: 8
    Last Post: December 28th, 2003, 11:17 PM

IMN logo majestic logo threadwatch logo seochat tools logo