More in this section

Forums / General Discussions / Using ASP.NET Chart Control

Using ASP.NET Chart Control

2 posts, 0 answered
  1. Eric
    Eric avatar
    147 posts
    Registered:
    12 Nov 2007
    19 Jul 2011
    Link to this post
    How can I get the ASP.NET Chart control to serve up images via the HttpHandler chartimg.axd? Adding the entry to the config file wasn't sufficient. For my custom HttpHandlers, I added routes during bootstrapper initialized event. Do I need to add a route for the chartimg.axd?

    protected void Application_Start(object sender, EventArgs e)
    {
        Bootstrapper.Initialized += Bootstrapper_Initialized;
    }
     
    private void Bootstrapper_Initialized(object sender, ExecutedEventArgs args)
    {
        if (args.CommandName == "RegisterRoutes")
        {
            var routes = (RouteCollection)args.Data;
            routes.MapHttpHandler<MyHandler>("myhandler.axd");
        }
    }

    I could probably use RadChart, but I wanted to keep my options open for future deployments where I might want to use this control on a non-Sitefinity site (and I don't want to purchase a separate RadControls license).

    Thanks,
    Eric
  2. Eric
    Eric avatar
    147 posts
    Registered:
    12 Nov 2007
    22 Jul 2011
    Link to this post
    Never mind. The first time I tried this it wasn't working, but probably because of something I screwed up. A second attempt and it worked flawlessly. I started with the RadChart which worked well then switched to the ASP.NET chart, which also worked. So I guess there's nothing extra you need to do (other than importing DataVIsualizations or whatever, adding the HttpHandler to the web config and register the asp:Chart tag).
2 posts, 0 answered