Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

AspDotNetStoreFront
  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Configure It! (...  Problem with ghost like objects
Previous Previous
 
Next Next
New Post 9/5/2008 3:36 AM
Resolved
User is offline som4
96 posts
10th Ranked


Problem with ghost like objects 

Hi all

I'm currently building two modules for searching our product database against googles AWS service.  You enter your search in to the search module then the results module on another page takes the keyword passed to it and generates data collected from the Amazon database.  Problem is it is very tempremental.  I keep getting "Object reference not set to an instance of an object." errors which i think is because an item i am trying to display has returned an empty or null value.  I'm not 100% sure thats the problem though and have spendt some time trying to catch all null values.  Is there a better way other than the EventViewer to get info on bugs?  I'm still fairly in the dark as to the cause of this random bug.

Si

 
New Post 9/9/2008 4:24 AM
User is offline som4
96 posts
10th Ranked


Re: Problem with ghost like objects! 

I figured it out in the end.  In order to use data from the amazon service you need to catch the nullreference exception that is thrown when a product from the service does not have a value.

    public string smallPic(int i)
    {
        try
        {
            return items[i].SmallImage.URL;
        }
        catch (NullReferenceException e)
        {
            return noImageUrl;
        }
    }

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Configure It! (...  Problem with ghost like objects
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Module Development by Engage Software
Specializing in custom module development, training and skinning.
www.engagesoftware.com
BataviaSoft DotNetNuke Solutions
BataviaSoft offers custom DotNetNuke solutions especially for the European and the South East Asian market.
www.bataviasoft.com
Viva Portals, L.L.C.
Expert module development and graphic design.
www.continure.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP