Jerry
Jerry

Reputation: 6577

How to draw lines on webform

Is there a way to draw lines on a ASP.Net webform?

My goal is to visually represent angles. The angles don't have to be exact, but somewhat dynamic.

Is there a .Net control that can do this?

Upvotes: 0

Views: 5483

Answers (2)

Aghilas Yakoub
Aghilas Yakoub

Reputation: 28990

1 You can use this code based on DrawLine

Bitmap bitmap = new Bitmap(200, 200);
graphics = Graphics.FromImage(bitmap);
graphics.DrawLine(new Pen(Color.Black), 0, 0, 200, 200);

2 You can use html tag <hr />

3 You can use jsdraw2d library

Link : http://jsdraw2d.jsfiction.com/

Upvotes: 1

Icarus
Icarus

Reputation: 63964

.NET Web Controls, at least the ones shipped with VS are not capable of doing this. In general you can do this on HTML5 + Javascript or some other third party control.

Another alternative (one that I dislike, BTW) would be to dynamically generate images and streaming them to the browser. But again, that doesn't seem the best option to me.

Upvotes: 1

Related Questions