Referencing ascx control using Visual Studio 2008 SP1 on ASP.NET 3.5 project

asp.net , controls , ascx , error BC00032 United Kingdom
  • 11 years ago

    I have a user control in a datagrid which I have given a className of QuotePrintDoc to in its Control directive on the control page. From this I am able to register an instance of the object on the datagrids - itemdatabound event.

    From there I can use the declaration:

    Dim objQuotePrintDoc as ASP.QuotePrintDoc = e.Item.FindControl("objQuotePrintDoc")
    
    objQuotePrintDoc.InitialiseDoc( <list of parameters to pass>)
    

    This all works fine and allows me to process the control through parameters. When I try to publish the project I get an error in the publish section as follows:

    error BC30002: Type ASP.QuotePrintDoc is not defined
    

    Has anyone any ideas what I need to do to enable publishing of this. I have also tried the route of putting in a placeholder and then using the <% Reference %> directive on the page. This also works but will not publish either.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“God could create the world in six days because he didn't have to make it compatible with the previous version.”