Dynamically Generating Imagemaps??

Discussion in 'ASP .Net Web Controls' started by Philip Wilson, Jan 8, 2005.

  1. Hello,

    I am trying to dynamically generate an imagemap in vb.net. I have managed to generate the image easily enough by creating a .aspx page that returns the generated image and then using the <img src="dynamicimage.aspx" imagemap=...> to put that image onto the page.

    I am using the following method in the dynamicimage.aspx to return the image:

    Response.ContentType = "image/gif"

    AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)


    Now I need to generate the imagemap HTML code. I thought the logical place to generate this code is in the dynamicimage.aspx page since I will already be working with the coordinates to create the image, so I can just create the HTML code as I create the image.

    But then, what is the best way to get that HTML code back into the main aspx page that contains the <img src="dynamicimage.aspx">.

    I would like to do it all on the one page by assigning the Bitmap object to an image on the page and then just outputting the imagemap code to the same page, however I have not seen any way of inserting the generated image into the existing page along with HTML code. If I use an ASP:Image I don't seem to have any way of specifying an imagemap and I can't see a way of linking my Bitmap object to a <IMG> without saving it out as a file first.

    I am fairly new to this, any ideas would be greatly appreciated.

    Cheers,
    Phil
     
    Philip Wilson, Jan 8, 2005
    #1
    1. Advertising

  2. how about using 'Response.BinaryWrite(Image.SaveGIFStream)' after the call to 'Response.ContentType'

    that way you can use 'IMG id="Image" src="dynamicimage.aspx"' in the calling page

    make sense?

    -BB


    "Philip Wilson" <> wrote in message news:...
    > Hello,
    >
    > I am trying to dynamically generate an imagemap in vb.net. I have managed to generate the image easily enough by creating a .aspx page that returns the generated image and then using the <img src="dynamicimage.aspx" imagemap=...> to put that image onto the page.
    >
    > I am using the following method in the dynamicimage.aspx to return the image:
    >
    > Response.ContentType = "image/gif"
    >
    > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)
    >
    >
    > Now I need to generate the imagemap HTML code. I thought the logical place to generate this code is in the dynamicimage.aspx page since I will already be working with the coordinates to create the image, so I can just create the HTML code as I create the image.
    >
    > But then, what is the best way to get that HTML code back into the main aspx page that contains the <img src="dynamicimage.aspx">.
    >
    > I would like to do it all on the one page by assigning the Bitmap object to an image on the page and then just outputting the imagemap code to the same page, however I have not seen any way of inserting the generated image into the existing page along with HTML code. If I use an ASP:Image I don't seem to have any way of specifying an imagemap and I can't see a way of linking my Bitmap object to a <IMG> without saving it out as a file first.
    >
    > I am fairly new to this, any ideas would be greatly appreciated.
    >
    > Cheers,
    > Phil
    >
    >
    >
    >
    >
     
    Brian Burgess, Jan 10, 2005
    #2
    1. Advertising

  3. sorry ... make that:
    'Image.Save(Response.OutputStream, ImageFormat.Gif)' instead of 'Response.BinaryWrite(Image.SaveGIFStream)'

    I copied the wrong line ... :-$


    -BB

    "Brian Burgess" <> wrote in message news:...
    how about using 'Response.BinaryWrite(Image.SaveGIFStream)' after the call to 'Response.ContentType'

    that way you can use 'IMG id="Image" src="dynamicimage.aspx"' in the calling page

    make sense?

    -BB


    "Philip Wilson" <> wrote in message news:...
    > Hello,
    >
    > I am trying to dynamically generate an imagemap in vb.net. I have managed to generate the image easily enough by creating a .aspx page that returns the generated image and then using the <img src="dynamicimage.aspx" imagemap=...> to put that image onto the page.
    >
    > I am using the following method in the dynamicimage.aspx to return the image:
    >
    > Response.ContentType = "image/gif"
    >
    > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)
    >
    >
    > Now I need to generate the imagemap HTML code. I thought the logical place to generate this code is in the dynamicimage.aspx page since I will already be working with the coordinates to create the image, so I can just create the HTML code as I create the image.
    >
    > But then, what is the best way to get that HTML code back into the main aspx page that contains the <img src="dynamicimage.aspx">.
    >
    > I would like to do it all on the one page by assigning the Bitmap object to an image on the page and then just outputting the imagemap code to the same page, however I have not seen any way of inserting the generated image into the existing page along with HTML code. If I use an ASP:Image I don't seem to have any way of specifying an imagemap and I can't see a way of linking my Bitmap object to a <IMG> without saving it out as a file first.
    >
    > I am fairly new to this, any ideas would be greatly appreciated.
    >
    > Cheers,
    > Phil
    >
    >
    >
    >
    >
     
    Brian Burgess, Jan 10, 2005
    #3
  4. Yeah, but isn't that what I have got already?

    > Response.ContentType = "image/gif"
    >
    > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)


    What I want to know is, if I create the <Map ....> HTML code in the dynamicimage.aspx page. What is the best way to transfer that text back to the page that is calling the dynamicimage.aspx.

    I will have a page that contains the '<IMG id="Image" src="dynamicimage.aspx" usemap=#mapname...>' but under that I will have to put the HTML code for the map which I will also be creating in the dynamicimage.aspx page.

    Basically I am needing to return two components to the calling page. The Image and the imagemap HTML Code. I can do the image, I'm just not sure how best to get the HTML text back.

    Does that make sense?

    I thought about adding a parameter to the dynamicimage.aspx page so that I can get it to return either the image or the imagemap code and then calling it twice. That just seemed a little redundant.

    Thanks,
    Phil


    >>> Brian Burgess<> 10/01/2005 19:19 >>>

    sorry ... make that:
    'Image.Save(Response.OutputStream, ImageFormat.Gif)' instead of 'Response.BinaryWrite(Image.SaveGIFStream)'

    I copied the wrong line ... :-$


    -BB

    "Brian Burgess" <> wrote in message news:...
    how about using 'Response.BinaryWrite(Image.SaveGIFStream)' after the call to 'Response.ContentType'

    that way you can use 'IMG id="Image" src="dynamicimage.aspx"' in the calling page

    make sense?

    -BB


    "Philip Wilson" <> wrote in message news:...
    > Hello,
    >
    > I am trying to dynamically generate an imagemap in vb.net. I have managed to generate the image easily enough by creating a .aspx page that returns the generated image and then using the <img src="dynamicimage.aspx" imagemap=...> to put that image onto the page.
    >
    > I am using the following method in the dynamicimage.aspx to return the image:
    >
    > Response.ContentType = "image/gif"
    >
    > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)
    >
    >
    > Now I need to generate the imagemap HTML code. I thought the logical place to generate this code is in the dynamicimage.aspx page since I will already be working with the coordinates to create the image, so I can just create the HTML code as I create the image.
    >
    > But then, what is the best way to get that HTML code back into the main aspx page that contains the <img src="dynamicimage.aspx">.
    >
    > I would like to do it all on the one page by assigning the Bitmap object to an image on the page and then just outputting the imagemap code to the same page, however I have not seen any way of inserting the generated image into the existing page along with HTML code. If I use an ASP:Image I don't seem to have any way of specifying an imagemap and I can't see a way of linking my Bitmap object to a <IMG> without saving it out as a file first.
    >
    > I am fairly new to this, any ideas would be greatly appreciated.
    >
    > Cheers,
    > Phil
    >
    >
    >
    >
    >
     
    Philip Wilson, Jan 11, 2005
    #4
  5. Ah yes .. perhaps it is what you already have... DOHH

    I my case I have only two files: 1) The imagemap HTML Code file that calls
    2) the dynamicimage.aspx. This way it is automatically 'returned' to the
    HTML code after the image is processed.

    Would this way work for you?
    ... or do you need the actual text stream of HTML code as well?

    -BB


    "Philip Wilson" <> wrote in message
    news:...
    > Yeah, but isn't that what I have got already?
    >
    > > Response.ContentType = "image/gif"
    > >
    > > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)

    >
    > What I want to know is, if I create the <Map ....> HTML code in the

    dynamicimage.aspx page. What is the best way to transfer that text back to
    the page that is calling the dynamicimage.aspx.
    >
    > I will have a page that contains the '<IMG id="Image"

    src="dynamicimage.aspx" usemap=#mapname...>' but under that I will have to
    put the HTML code for the map which I will also be creating in the
    dynamicimage.aspx page.
    >
    > Basically I am needing to return two components to the calling page. The

    Image and the imagemap HTML Code. I can do the image, I'm just not sure how
    best to get the HTML text back.
    >
    > Does that make sense?
    >
    > I thought about adding a parameter to the dynamicimage.aspx page so that I

    can get it to return either the image or the imagemap code and then calling
    it twice. That just seemed a little redundant.
    >
    > Thanks,
    > Phil
    >
    >
    > >>> Brian Burgess<> 10/01/2005 19:19 >>>

    > sorry ... make that:
    > 'Image.Save(Response.OutputStream, ImageFormat.Gif)' instead of

    'Response.BinaryWrite(Image.SaveGIFStream)'
    >
    > I copied the wrong line ... :-$
    >
    >
    > -BB
    >
    > "Brian Burgess" <> wrote in message

    news:...
    > how about using 'Response.BinaryWrite(Image.SaveGIFStream)' after the

    call to 'Response.ContentType'
    >
    > that way you can use 'IMG id="Image" src="dynamicimage.aspx"' in the

    calling page
    >
    > make sense?
    >
    > -BB
    >
    >
    > "Philip Wilson" <> wrote in message

    news:...
    > > Hello,
    > >
    > > I am trying to dynamically generate an imagemap in vb.net. I have

    managed to generate the image easily enough by creating a .aspx page that
    returns the generated image and then using the <img src="dynamicimage.aspx"
    imagemap=...> to put that image onto the page.
    > >
    > > I am using the following method in the dynamicimage.aspx to return the

    image:
    > >
    > > Response.ContentType = "image/gif"
    > >
    > > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)
    > >
    > >
    > > Now I need to generate the imagemap HTML code. I thought the logical

    place to generate this code is in the dynamicimage.aspx page since I will
    already be working with the coordinates to create the image, so I can just
    create the HTML code as I create the image.
    > >
    > > But then, what is the best way to get that HTML code back into the

    main aspx page that contains the <img src="dynamicimage.aspx">.
    > >
    > > I would like to do it all on the one page by assigning the Bitmap

    object to an image on the page and then just outputting the imagemap code to
    the same page, however I have not seen any way of inserting the generated
    image into the existing page along with HTML code. If I use an ASP:Image I
    don't seem to have any way of specifying an imagemap and I can't see a way
    of linking my Bitmap object to a <IMG> without saving it out as a file
    first.
    > >
    > > I am fairly new to this, any ideas would be greatly appreciated.
    > >
    > > Cheers,
    > > Phil
    > >
    > >
    > >
    > >
    > >
     
    Brian Burgess, Jan 11, 2005
    #5
  6. Does this mean that your imagemap HTML is static and you just dynamically create the image?

    In my case, I am wanting to dynamically create the both the imagemap and the image. I think I am just going to to try calling the dynamicimage.aspx file twice and get it to return either the image or the imagemap depending on a parameter. I don't think it will add too much overhead.

    Thanks for your help,
    Phil


    >>> Brian Burgess<> 11/01/2005 8:15:24 pm >>>

    Ah yes .. perhaps it is what you already have... DOHH

    I my case I have only two files: 1) The imagemap HTML Code file that calls
    2) the dynamicimage.aspx. This way it is automatically 'returned' to the
    HTML code after the image is processed.

    Would this way work for you?
    ... or do you need the actual text stream of HTML code as well?

    -BB


    "Philip Wilson" <> wrote in message
    news:...
    > Yeah, but isn't that what I have got already?
    >
    > > Response.ContentType = "image/gif"
    > >
    > > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)

    >
    > What I want to know is, if I create the <Map ....> HTML code in the

    dynamicimage.aspx page. What is the best way to transfer that text back to
    the page that is calling the dynamicimage.aspx.
    >
    > I will have a page that contains the '<IMG id="Image"

    src="dynamicimage.aspx" usemap=#mapname...>' but under that I will have to
    put the HTML code for the map which I will also be creating in the
    dynamicimage.aspx page.
    >
    > Basically I am needing to return two components to the calling page. The

    Image and the imagemap HTML Code. I can do the image, I'm just not sure how
    best to get the HTML text back.
    >
    > Does that make sense?
    >
    > I thought about adding a parameter to the dynamicimage.aspx page so that I

    can get it to return either the image or the imagemap code and then calling
    it twice. That just seemed a little redundant.
    >
    > Thanks,
    > Phil
    >
    >
    > >>> Brian Burgess<> 10/01/2005 19:19 >>>

    > sorry ... make that:
    > 'Image.Save(Response.OutputStream, ImageFormat.Gif)' instead of

    'Response.BinaryWrite(Image.SaveGIFStream)'
    >
    > I copied the wrong line ... :-$
    >
    >
    > -BB
    >
    > "Brian Burgess" <> wrote in message

    news:...
    > how about using 'Response.BinaryWrite(Image.SaveGIFStream)' after the

    call to 'Response.ContentType'
    >
    > that way you can use 'IMG id="Image" src="dynamicimage.aspx"' in the

    calling page
    >
    > make sense?
    >
    > -BB
    >
    >
    > "Philip Wilson" <> wrote in message

    news:...
    > > Hello,
    > >
    > > I am trying to dynamically generate an imagemap in vb.net. I have

    managed to generate the image easily enough by creating a .aspx page that
    returns the generated image and then using the <img src="dynamicimage.aspx"
    imagemap=...> to put that image onto the page.
    > >
    > > I am using the following method in the dynamicimage.aspx to return the

    image:
    > >
    > > Response.ContentType = "image/gif"
    > >
    > > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)
    > >
    > >
    > > Now I need to generate the imagemap HTML code. I thought the logical

    place to generate this code is in the dynamicimage.aspx page since I will
    already be working with the coordinates to create the image, so I can just
    create the HTML code as I create the image.
    > >
    > > But then, what is the best way to get that HTML code back into the

    main aspx page that contains the <img src="dynamicimage.aspx">.
    > >
    > > I would like to do it all on the one page by assigning the Bitmap

    object to an image on the page and then just outputting the imagemap code to
    the same page, however I have not seen any way of inserting the generated
    image into the existing page along with HTML code. If I use an ASP:Image I
    don't seem to have any way of specifying an imagemap and I can't see a way
    of linking my Bitmap object to a <IMG> without saving it out as a file
    first.
    > >
    > > I am fairly new to this, any ideas would be greatly appreciated.
    > >
    > > Cheers,
    > > Phil
    > >
    > >
    > >
    > >
    > >
     
    Philip Wilson, Jan 12, 2005
    #6
  7. Hi Philip,

    sorry to take so long to reply .. I've been out about day and a half.

    Yes in my case the imagemap HTML is a static page that calls the dynamic
    image aspx page. the dynamic page merely loads a base JPG file, then
    overlays text at dynamic positions, then writes the binary image data back
    to the static HTML (imagemap) page.

    I think your on the right track already .. since you can only write one
    stream out to the outgoing HTTP response stream.

    good luck

    -BB


    "Philip Wilson" <> wrote in message
    news:eOhqdoI%...
    > Does this mean that your imagemap HTML is static and you just dynamically

    create the image?
    >
    > In my case, I am wanting to dynamically create the both the imagemap and

    the image. I think I am just going to to try calling the dynamicimage.aspx
    file twice and get it to return either the image or the imagemap depending
    on a parameter. I don't think it will add too much overhead.
    >
    > Thanks for your help,
    > Phil
    >
    >
    > >>> Brian Burgess<> 11/01/2005 8:15:24 pm >>>

    > Ah yes .. perhaps it is what you already have... DOHH
    >
    > I my case I have only two files: 1) The imagemap HTML Code file that

    calls
    > 2) the dynamicimage.aspx. This way it is automatically 'returned' to

    the
    > HTML code after the image is processed.
    >
    > Would this way work for you?
    > .. or do you need the actual text stream of HTML code as well?
    >
    > -BB
    >
    >
    > "Philip Wilson" <> wrote in message
    > news:...
    > > Yeah, but isn't that what I have got already?
    > >
    > > > Response.ContentType = "image/gif"
    > > >
    > > > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)

    > >
    > > What I want to know is, if I create the <Map ....> HTML code in the

    > dynamicimage.aspx page. What is the best way to transfer that text back to
    > the page that is calling the dynamicimage.aspx.
    > >
    > > I will have a page that contains the '<IMG id="Image"

    > src="dynamicimage.aspx" usemap=#mapname...>' but under that I will have to
    > put the HTML code for the map which I will also be creating in the
    > dynamicimage.aspx page.
    > >
    > > Basically I am needing to return two components to the calling page. The

    > Image and the imagemap HTML Code. I can do the image, I'm just not sure

    how
    > best to get the HTML text back.
    > >
    > > Does that make sense?
    > >
    > > I thought about adding a parameter to the dynamicimage.aspx page so that

    I
    > can get it to return either the image or the imagemap code and then

    calling
    > it twice. That just seemed a little redundant.
    > >
    > > Thanks,
    > > Phil
    > >
    > >
    > > >>> Brian Burgess<> 10/01/2005 19:19 >>>

    > > sorry ... make that:
    > > 'Image.Save(Response.OutputStream, ImageFormat.Gif)' instead of

    > 'Response.BinaryWrite(Image.SaveGIFStream)'
    > >
    > > I copied the wrong line ... :-$
    > >
    > >
    > > -BB
    > >
    > > "Brian Burgess" <> wrote in message

    > news:...
    > > how about using 'Response.BinaryWrite(Image.SaveGIFStream)' after the

    > call to 'Response.ContentType'
    > >
    > > that way you can use 'IMG id="Image" src="dynamicimage.aspx"' in the

    > calling page
    > >
    > > make sense?
    > >
    > > -BB
    > >
    > >
    > > "Philip Wilson" <> wrote in message

    > news:...
    > > > Hello,
    > > >
    > > > I am trying to dynamically generate an imagemap in vb.net. I have

    > managed to generate the image easily enough by creating a .aspx page that
    > returns the generated image and then using the <img

    src="dynamicimage.aspx"
    > imagemap=...> to put that image onto the page.
    > > >
    > > > I am using the following method in the dynamicimage.aspx to return

    the
    > image:
    > > >
    > > > Response.ContentType = "image/gif"
    > > >
    > > > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)
    > > >
    > > >
    > > > Now I need to generate the imagemap HTML code. I thought the logical

    > place to generate this code is in the dynamicimage.aspx page since I will
    > already be working with the coordinates to create the image, so I can just
    > create the HTML code as I create the image.
    > > >
    > > > But then, what is the best way to get that HTML code back into the

    > main aspx page that contains the <img src="dynamicimage.aspx">.
    > > >
    > > > I would like to do it all on the one page by assigning the Bitmap

    > object to an image on the page and then just outputting the imagemap code

    to
    > the same page, however I have not seen any way of inserting the generated
    > image into the existing page along with HTML code. If I use an ASP:Image I
    > don't seem to have any way of specifying an imagemap and I can't see a way
    > of linking my Bitmap object to a <IMG> without saving it out as a file
    > first.
    > > >
    > > > I am fairly new to this, any ideas would be greatly appreciated.
    > > >
    > > > Cheers,
    > > > Phil
    > > >
    > > >
    > > >
    > > >
    > > >

    >
    >
    >
    >
     
    Brian Burgess, Jan 14, 2005
    #7
  8. Philip Wilson

    Jack71 Guest

    try this:

    Dim stx As String
    stx += "<map name=^ToscanaMap^>"
    stx += "<area shape=^RECT^ coords=^107,202,172,227^
    href=^grosseto.htm^>"
    stx += "<area shape=^RECT^ coords=^65,143,126,170^
    href=^livorno.htm^>"
    stx += "<area shape=^RECT^ coords=^133,145,180,170^
    href=^siena.htm^>"
    stx += "<area shape=^RECT^ coords=^183,113,240,136^
    href=^arezzo.htm^>"
    stx += "<area shape=^RECT^ coords=^70,111,107,134^
    href=^pisa.htm^>"
    stx += "<area shape=^RECT^ coords=^108,76,155,98^
    href=^prato.htm^>"
    stx += "<area shape=^RECT^ coords=^40,54,87,79^ href=^lucca.htm^>"
    stx += "<area shape=^RECT^ coords=^153,40,213,63^
    href=^firenze.htm^>"
    stx += "<area shape=^RECT^ coords=^83,33,138,58^
    href=^pistoia.htm^>"
    stx += "<area shape=^RECT^ coords=^9,2,119,27^
    href=^massa_carrara.htm^>"
    stx += "</map>"
    stx += "<IMG alt=^^ src=^images/Toscana_Intera.gif^
    useMap=^#ToscanaMap^ border=^0^>"
    stx = stx.Replace("^", """")

    PanelToscana.Controls.Clear()
    PanelToscana.Controls.Add(New LiteralControl(stx))

    "Brian Burgess" wrote:

    > Hi Philip,
    >
    > sorry to take so long to reply .. I've been out about day and a half.
    >
    > Yes in my case the imagemap HTML is a static page that calls the dynamic
    > image aspx page. the dynamic page merely loads a base JPG file, then
    > overlays text at dynamic positions, then writes the binary image data back
    > to the static HTML (imagemap) page.
    >
    > I think your on the right track already .. since you can only write one
    > stream out to the outgoing HTTP response stream.
    >
    > good luck
    >
    > -BB
    >
    >
    > "Philip Wilson" <> wrote in message
    > news:eOhqdoI%...
    > > Does this mean that your imagemap HTML is static and you just dynamically

    > create the image?
    > >
    > > In my case, I am wanting to dynamically create the both the imagemap and

    > the image. I think I am just going to to try calling the dynamicimage.aspx
    > file twice and get it to return either the image or the imagemap depending
    > on a parameter. I don't think it will add too much overhead.
    > >
    > > Thanks for your help,
    > > Phil
    > >
    > >
    > > >>> Brian Burgess<> 11/01/2005 8:15:24 pm >>>

    > > Ah yes .. perhaps it is what you already have... DOHH
    > >
    > > I my case I have only two files: 1) The imagemap HTML Code file that

    > calls
    > > 2) the dynamicimage.aspx. This way it is automatically 'returned' to

    > the
    > > HTML code after the image is processed.
    > >
    > > Would this way work for you?
    > > .. or do you need the actual text stream of HTML code as well?
    > >
    > > -BB
    > >
    > >
    > > "Philip Wilson" <> wrote in message
    > > news:...
    > > > Yeah, but isn't that what I have got already?
    > > >
    > > > > Response.ContentType = "image/gif"
    > > > >
    > > > > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)
    > > >
    > > > What I want to know is, if I create the <Map ....> HTML code in the

    > > dynamicimage.aspx page. What is the best way to transfer that text back to
    > > the page that is calling the dynamicimage.aspx.
    > > >
    > > > I will have a page that contains the '<IMG id="Image"

    > > src="dynamicimage.aspx" usemap=#mapname...>' but under that I will have to
    > > put the HTML code for the map which I will also be creating in the
    > > dynamicimage.aspx page.
    > > >
    > > > Basically I am needing to return two components to the calling page. The

    > > Image and the imagemap HTML Code. I can do the image, I'm just not sure

    > how
    > > best to get the HTML text back.
    > > >
    > > > Does that make sense?
    > > >
    > > > I thought about adding a parameter to the dynamicimage.aspx page so that

    > I
    > > can get it to return either the image or the imagemap code and then

    > calling
    > > it twice. That just seemed a little redundant.
    > > >
    > > > Thanks,
    > > > Phil
    > > >
    > > >
    > > > >>> Brian Burgess<> 10/01/2005 19:19 >>>
    > > > sorry ... make that:
    > > > 'Image.Save(Response.OutputStream, ImageFormat.Gif)' instead of

    > > 'Response.BinaryWrite(Image.SaveGIFStream)'
    > > >
    > > > I copied the wrong line ... :-$
    > > >
    > > >
    > > > -BB
    > > >
    > > > "Brian Burgess" <> wrote in message

    > > news:...
    > > > how about using 'Response.BinaryWrite(Image.SaveGIFStream)' after the

    > > call to 'Response.ContentType'
    > > >
    > > > that way you can use 'IMG id="Image" src="dynamicimage.aspx"' in the

    > > calling page
    > > >
    > > > make sense?
    > > >
    > > > -BB
    > > >
    > > >
    > > > "Philip Wilson" <> wrote in message

    > > news:...
    > > > > Hello,
    > > > >
    > > > > I am trying to dynamically generate an imagemap in vb.net. I have

    > > managed to generate the image easily enough by creating a .aspx page that
    > > returns the generated image and then using the <img

    > src="dynamicimage.aspx"
    > > imagemap=...> to put that image onto the page.
    > > > >
    > > > > I am using the following method in the dynamicimage.aspx to return

    > the
    > > image:
    > > > >
    > > > > Response.ContentType = "image/gif"
    > > > >
    > > > > AttBitmap.Save(Response.OutputStream, ImageFormat.Gif)
    > > > >
    > > > >
    > > > > Now I need to generate the imagemap HTML code. I thought the logical

    > > place to generate this code is in the dynamicimage.aspx page since I will
    > > already be working with the coordinates to create the image, so I can just
    > > create the HTML code as I create the image.
    > > > >
    > > > > But then, what is the best way to get that HTML code back into the

    > > main aspx page that contains the <img src="dynamicimage.aspx">.
    > > > >
    > > > > I would like to do it all on the one page by assigning the Bitmap

    > > object to an image on the page and then just outputting the imagemap code

    > to
    > > the same page, however I have not seen any way of inserting the generated
    > > image into the existing page along with HTML code. If I use an ASP:Image I
    > > don't seem to have any way of specifying an imagemap and I can't see a way
    > > of linking my Bitmap object to a <IMG> without saving it out as a file
    > > first.
    > > > >
    > > > > I am fairly new to this, any ideas would be greatly appreciated.
    > > > >
    > > > > Cheers,
    > > > > Phil
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >
    > >

    >
    >
    >
     
    Jack71, May 4, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David

    imagemaps

    David, Oct 18, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    694
    S. Justin Gengo
    Oct 18, 2005
  2. Paul F. Johnson

    imagemaps and css

    Paul F. Johnson, Nov 14, 2003, in forum: HTML
    Replies:
    5
    Views:
    513
    Sid Ismail
    Nov 14, 2003
  3. brucie

    images vs imagemaps

    brucie, Jan 21, 2004, in forum: HTML
    Replies:
    11
    Views:
    636
    brucie
    Jan 22, 2004
  4. timothy
    Replies:
    4
    Views:
    1,399
    Jeffrey Silverman
    Nov 30, 2004
  5. Nathan Sokalski

    White strip showing up between two imagemaps

    Nathan Sokalski, Sep 22, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    377
    Nathan Sokalski
    Sep 23, 2006
Loading...

Share This Page