Solved

Drawing a graph on a custom web control in ASP.Net 2.0 and c#

Posted on 2010-09-03
1
568 Views
Last Modified: 2013-11-08
I have the need to design a web control whose job will be to draw a graph (using GDI+ functions) on its surface; looking on line I found a number of examples on how to draw on ASP.Net Web Forms (using either a stream in the page's response or saving the image onto a file and having an image control display that). These examples are however based on a Page object and offer very little explanation of how one can arrange the graphs position in relation with other controls on the form.

Is there a way for me to design a custom web control which will draw the graph on its surface? Can I access the control's surface?  An example would be greatly appreciated.

Thanks

Chris
0
Comment
Question by:CLoucas
1 Comment
 
LVL 51

Accepted Solution

by:
tedbilly earned 500 total points
ID: 33602129
Not really.  Web applications aren't like a windows application where you have explicit control and access to the form.

All your rendering has to be controlled by the HTML elements which are then controlled using CSS.

You can explicitly control the CSS on the client however, you have to do all the work server side before sending the page to the client.

With AJAX or an IMG control that requests a page like this <img src='http://myserver/MyRenderingPage.aspx" /> you can return results without a full round trip but ultimately what you can do client side has to be completed using JavaScript or new tags like HTML 5, Flash or Java.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now