Solved

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

Posted on 2010-09-03
1
572 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:
Ted Bouskill 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

839 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