pagina
codice:
[img]a.aspx?img=on[/img]
codice
codice:
Option Strict On
Imports l = libreria.ModuloWeb
Partial Class prove_a
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim img As String = l.RequestParams("img")
If img = "on" Then ProvaGrafico()
End Sub
Protected Sub ProvaGrafico()
Dim bit As New Bitmap(300, 300)
Dim grap As Graphics = Graphics.FromImage(bit)
Dim rect As New Rectangle(0, 0, 300, 300)
grap.FillRectangle(Brushes.Red, rect)
grap.DrawLine(Pens.Black, 0, 0, 300, 300)
grap.DrawLine(Pens.Black, 0, 300, 300, 0)
Response.ContentType = "image/gif"
bit.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif)
grap.Dispose()
bit.Dispose()
Response.End()
End Sub
End Class