how to use the api in an ascx file

Nov 15, 2010 at 3:00 PM

how to reference the api in an ASCX?

Nov 16, 2010 at 9:36 AM


do not know, sorry :)

it is old project, now i am oriented to the Silverlight

May 12, 2011 at 7:42 PM
Edited May 12, 2011 at 7:43 PM

I've done it by adding the following to the ascx file:


<%@ Register Assembly="GoogleVisualizationAPI" Namespace="GoogleVisualizationAPI"
    TagPrefix="gvapi" %>

    <gvapi:GoogleContainer ID="graph1" ClassName="clientVisualization" runat="server" />


in the masterpage add runat="server" to the head tag. This enables you to do the following in codebehind(ascx.cs) of the  file:


            var GVAPI = new GoogleVisualization();
            GVAPI.ID = "GVAPI";

and then just look at the sample for the project on how to add data to the GoogleContainer