geoffHome
Posts: 4
Joined: Sun Aug 19, 2007 10:54 pm

Highslide formatting broken by including asp.NET control

I'm building on top of a basic example e.g.;

<div class="highslide-gallery" style="width: 600px; margin: auto">
<a class='highslide' href='images/thumbstrip01.jpg' onclick="return hs.expand(this)">
<img src='images/thumbstrip01.thumb.png' alt='Mountain valley'/></a>

<a class='highslide' href='WebControls/imgHandler.ashx?imageID=8&Size=L' onclick="return hs.expand(this)">
<img src='WebControls/imgHandler.ashx?imageID=8&Size=S' alt=''/></a> <!-- this works fine too! -->
</div>

<!--
* Including this part stops the proper functioning of HighSlide formatting


<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="LinqDataSource1">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<a href='<%# "WebControls/imgHandler.ashx?imageID=" & Eval("ImageID") & "&Size=L"%>' class="highslide" title="" onclick="return hs.expand(this, config1 )">
<img src='<%# "WebControls/imgHandler.ashx?imageID=" & Eval("ImageID") & "&Size=S"%>' alt="" />
</a>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
-->
The gridview retrieves all the right data but its presence stops all the 'nice' presentation on click like dimmed background, centered and frame with navigation bits and pieces. Clicking simply gives a plain larger image in top left-hand corner of screen.
Any ideas what is getting in the way? Thanks
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: Highslide formatting broken by including asp.NET control

Do you have a configuration object for config1? The below code will not work unless you have a configuration object for config1 in your Highslide settings.

Code: Select all

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="LinqDataSource1">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <a href='<%# "WebControls/imgHandler.ashx?imageID=" & Eval("ImageID") & "&Size=L"%>'  class="highslide"  title="" onclick="return hs.expand(this, [hilight]config1[/hilight])">
	                        <img src='<%# "WebControls/imgHandler.ashx?imageID=" & Eval("ImageID") & "&Size=S"%>'   alt="" />
                    </a>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
 -->
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
geoffHome
Posts: 4
Joined: Sun Aug 19, 2007 10:54 pm

Re: Highslide formatting broken by including asp.NET control

Thanks RoadRash. No idea where the config1 came from.
All fixed and working now. Thanks

Return to “Highslide JS Usage”