Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to dynamically set Imagemao NavigateURL in a datali
Message
From
13/10/2005 13:34:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01058549
Message ID:
01058780
Views:
9
I don't have 2.0 here but AFAIK navigateURL exists as a property of imageMap control, no?
Cetin

>Thank you Cetin, but I have the ImageURL just like your code and it works fine. But when a user clicks ON the ImageMap in the datalist you have a "hotspot" defined that sends them to a URL using the hotspot.NavigatioURL property. In this case, when they click on the image of a hotel in the datalist I want to send them to the hotel's homepage.
>
>When I try to databind the hotspot's NavigationURL property with this code:
>
>HotSpotMode="Navigate" NavigateUrl='<%# Eval("GoToURL") ' />
>
>
>I get this error:
>
>Error 1 Databinding expressions are only supported on controls. System.Web.UI.WebControls.RectangleHotSpot is not a control.
>
>So I don't know how to set the NavigateURL that the imagemap click goes TO.
>
>I've spent a lot of time on this with no luck. Obviously I must be able to use an ImageMap in a simple datalist in ASP 2.0 to link to another site!
>
>Any ideas?
>
>
>
>>>I have an imagemap in a datalist with one hotspot that covers the entire image. I want the imagemap to show a URL stored in a database field name ImageURL.
>>>
>>>I get a "cannot bind" error when trying to use EVAL("ImageMap"), and I can find no other way to dynamically set it in a datalist.
>>>
>>>Does anyone know how to do this?
>>>
>>>Thanks in advance!
>>
>>Not sure is this is what you're looking for:
>>
>>
>><asp:ImageMap id="myImage"
>>  ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ImageURLFieldValue")   '
>>  runat="server"/>
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform