Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > imagemaps

Reply
Thread Tools

imagemaps

 
 
David
Guest
Posts: n/a
 
      10-18-2005
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


 
Reply With Quote
 
 
 
 
S. Justin Gengo
Guest
Posts: n/a
 
      10-18-2005
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
"David" <(E-Mail Removed)> wrote in message
news:OavSDj$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
David
Guest
Posts: n/a
 
      10-18-2005
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
"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:%23bsWVw$(E-Mail Removed)...
> 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
> "David" <(E-Mail Removed)> wrote in message
> news:OavSDj$(E-Mail Removed)...
>> 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
>>
>>

>
>



 
Reply With Quote
 
S. Justin Gengo
Guest
Posts: n/a
 
      10-18-2005
David,

Glad you found it!

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"David" <(E-Mail Removed)> wrote in message
news:%23gMD87$(E-Mail Removed)...
> 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
> "S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
> message news:%23bsWVw$(E-Mail Removed)...
>> 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
>> "David" <(E-Mail Removed)> wrote in message
>> news:OavSDj$(E-Mail Removed)...
>>> 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
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Freeware for clickable imagemaps? Yrrah HTML 5 01-07-2007 01:51 PM
White strip showing up between two imagemaps Nathan Sokalski ASP .Net 4 09-22-2006 11:53 PM
Howto create rollovers in imagemaps? timothy HTML 4 11-30-2004 06:45 PM
images vs imagemaps brucie HTML 11 01-22-2004 01:52 AM
imagemaps and css Paul F. Johnson HTML 5 11-14-2003 01:54 PM



Advertisments