Storing an image map in a database

Posted by ColoradoRockie on Stack Overflow See other posts from Stack Overflow or by ColoradoRockie
Published on 2010-04-22T21:09:41Z Indexed on 2010/04/22 21:13 UTC
Read the original article Hit count: 285

Filed under:
|

I have a requirement to allow users in a content management system to create their own image maps through a gui interface, which I have accomplished. But instead of saving the image map to the page code, I want to save the image map code to a database (sql), which I've also accomplished.
When I started down this road in my head I was thinking the whole time that I'd just add the "usemap" attribute at runtime shown below where promo1.ImageMap holds the entire map code:

if(promo1.HasImageMap) imgPromotion1.Attributes.Add("usemap", promo1.ImageMap);

I guess I didn't think it though well enough, because it seems that "usemap" only expects the name of the existing map to use from the page code, and not the map code as a string.

Does anyone have any clever ideas on how to apply the map from the database to the image at run time?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about html