Subject: Opinion Polls chapter problem
Posted By: stzd8 Post Date: 12/15/2006 12:02:40 AM
Ok, I ran the stupid chapter 6 from A to Z.  On page 324, we can test the Polls control on the master page.  When I try to run the page, I get this incredible annoying error:

It stops on "PollsProvider.cs" file, telling me that it cannot run a null argument on the

static public PollsProvider Instance
        {
            get
            {
                if (_instance == null)
                    _instance = (PollsProvider)Activator.CreateInstance(
                       Type.GetType(Globals.Settings.Polls.ProviderType));
                return _instance;
            }
        }

I run the sample project, it runs fine.  But if I run mine (copy and paste) it doesn't.  I hate when this book doesn't cover all the coding and leaves you guess what to do.  Since the provided code is not segmented on chapters but on the last chapter which you can't rely on the chapter you read.

Reply By: MythicalMe Reply Date: 12/15/2006 2:23:17 AM
Have you made sure that you added the providerType code for the PollsElement class in ConfigSection.cs? Make sure that you have a providerType too.


Go to topic 53277

Return to index page 92
Return to index page 91
Return to index page 90
Return to index page 89
Return to index page 88
Return to index page 87
Return to index page 86
Return to index page 85
Return to index page 84
Return to index page 83