Error when declaring OWC object

J

jmk

This might be a stupid qestion, since my time spent on programming
ASP.NET is rather limited, but nevertheless:

In order to use the (fmpov) fantastic intellisense option i MS Visual
Studio, I have to declare like this:

Dim Chart1 As OWC10.ChChart
Chart1 = ChartSpace1.Charts.Add(0)

Then I get all the Properties/Methods available for Chart1 as
"intellisense dropdown menu" in Visual Studio.

But when opening the page after rebuild, I get this error "Specified
cast is not valid " for the second line above.

I have to declare like this

Dim Chart1
Chart1 = ChartSpace1.Charts.Add(0)

Then the page is acting like its supposed to, but I don't have
intellisense for the Chart1 object in Visual Studio.

Why?

Regards,
John Martin
 
V

vapor

Not sure why, it may be because of the implicit cast performed by Visual
Basic.

--
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top