namespace System.drawing

i used codebehind window,the coding i gave is

imports system.drawing

private sub page_load()
dim gobj as graphics
dim pobj as pen
gobj = me.creategraphics
gobj.drawline(pobj,100,150,200,300)
end sub

the error it shows is creategraphics is not there in asp.net

one more thing which tools we should use for webform designing,

from
Bhuvaneshwari

Comments

  • CreateGraphics is not a Page object method. You can only create Bitmap and Graphic objects from an Image object like so:

    [code]
    Private Sub page_load()
    Dim gobj As Graphics
    Dim pobj As New Pen(Color.Red)

    ' Create a 100 x 100 pixel image buffer
    Dim bm As New Bitmap(100, 100)

    ' Create graphics object from image buffer
    gobj = Graphics.FromImage(bm)

    gobj.DrawLine(pobj, 100, 150, 200, 300)

    pobj.Dispose()
    gobj.Dispose()
    End Sub
    [/code]

    As for ASP.NET design tools, you can use Visual Studio.NET, Dream Weaver MX, or you can download a free tool called the Web Matrix (http://www.asp.net.)


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion