imagemaps

D

David

Hi all,

I need to change the URL in an imagemap area tag.

I have put...

<area id="MapAreaName" runat="server" coords=....

Without a reference in codebehind, it doesn't appear to work, so in
Codebehind, I have written

protected System.Web.UI.HtmlControls.HtmlGenericControl MapAreaName;

However, it doesn't appear to be an HtmlGenericControl.

I was going to try changing the href attribute with the
Attributes.Remove("href") then Attributes.Add("href", "new location")

What would it be?

Best regards,
Dave Colliver.
http://www.EdinburghFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
 
S

S. Justin Gengo

David,

The HtmlAnchor is normally used for a link <a> and that would have the href
property. I'm not positive that it will work for you or not but I'd give
declaring your area tag as that a try.

Otherwise what happens when you try?

MapAreaName.Attributes.Add("href", "NewLocation")

(I don't think you need to remove the href first... It should just be
replaced by the Add.)


--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
D

David

Hi,

Thanks for the response...

I am using the map in a dynamically loaded user control. They way it was
loading, I couldn't actually see what was happening.

I built a simple test page, did as you suggested and I got an error. It is
actually of a type HtmlGenericControl, which is what I had. However, the
imagemap I had was not xhtml, which didn't have a closing </map> tag.

So, when I put that in, I now expect it will all work.

Thanks for your help.

Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top