an error message- Object reference not set to an instance of anobject.

Discussion in 'ASP .Net' started by Montezuma's Daughter, Jul 19, 2008.

  1. Hi all
    it is my first application. I wrote a class libraray with functions
    and a simple class with form, textbox, buttons and a label.
    I added reference to the second class so I would read the class
    library. the I met 2 problems:
    1.test data in the textbox is string and I need a double, how do I
    convert it?
    2.in default.cs I get en error message :
    ======================================================
    One or more errors encountered while loading the designer. The errors
    are listed below. Some errors can be fixed by rebuilding your project,
    while others may require code changes.

    Object reference not set to an instance of an object.
    Hide

    at
    Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader
    stream)
    at System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader
    codeStream)
    at
    Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()
    at
    Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
    serializationManager)
    at
    System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost
    host)
     
    Montezuma's Daughter, Jul 19, 2008
    #1
    1. Advertising

  2. Montezuma's Daughter

    Munna Guest

    Munna, Jul 19, 2008
    #2
    1. Advertising

  3. Montezuma's Daughter

    Munna Guest

    Hi

    "1.test data in the textbox is string and I need a double, how do I
    convert it? "

    double.Parse
    double.TryParse
    Convert.ToDouble

    use one of those function to convert string to double...

    check if use try tring to access any unassigned object...

    "Object reference not set to an instance of an object. " is occured
    when you try to access an unassigned object reference

    Best of luck

    -------
    Munna

    www.munna.shatkotha.com/blog
    www.munna.shatkotha.com
    www.shatkotha.com
     
    Munna, Jul 19, 2008
    #3
  4. Gu there
    thanks. the conversation worked, thanks
    stll not sure what objwct I didn't uninitialized ? if I use class
    library I need to make an instance of it? or is it the text box?






    On Jul 19, 1:50 pm, Munna <> wrote:
    > Hi,
    >
    > "Object reference not set to an instance of an object. "
    >
    > this error message is thrown when you try to use an uninitialized
    > object...
    >
    > check your code ...
    >
    > Best of luck
    >
    > -------
    > Munna
    >
    > www.munna.shatkotha.com/blogwww.munna.shatkotha.comwww.shatkotha.com
     
    Montezuma's Daughter, Jul 19, 2008
    #4
  5. Montezuma's Daughter

    Munna Guest

    Hi,

    The error i seeing is designer serialization errors... are u using any
    custom controls?
    well another question from my part... the errors are showing in design
    mode of the page ... right?
    when you done coding close the aspx page... then compile... and run
    the project....
    make sure you do close the page before u run the project...

    BEST OF LUCK

    --------------
    Munna

    www.munna.shatkotha.com
    www.munna.shatkotha.com/blog
    www.shatkotha.com
     
    Munna, Jul 19, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Parthiv Joshi
    Replies:
    2
    Views:
    696
    Kalyan
    Jul 2, 2004
  2. Suresh Kojhani
    Replies:
    1
    Views:
    2,391
    Anushi
    Jul 29, 2004
  3. Pedro Correia
    Replies:
    0
    Views:
    629
    Pedro Correia
    Jul 25, 2003
  4. Lauchlan M
    Replies:
    1
    Views:
    2,368
    S. Justin Gengo
    Aug 18, 2003
  5. Replies:
    1
    Views:
    482
    Mark Rae [MVP]
    Sep 20, 2007
Loading...

Share This Page