Highslide JS .NET

Highslide JS .NET is a .NET control to encapsulate the functionality of Torstein Honsi’s Highslide JS library. This is an example of it in action (see below for how little code was needed to create this demo page):

Important: Highslide JS is free for non-commercial use. However, if you implement this commercially there is a license fee per domain. More details are available on the official Highslide JS page. If you use this commercially, please don’t forget to support the author!

Usage example

<%@ Register Assembly="HighslideImage" Namespace="Encosia" TagPrefix="encosia" %>
<encosia:HighslideManager runat="server" OutlineType="RoundedWhite" />
<encosia:HighslideImage runat="server" Caption="Image One"
  ImageUrl="Thumbnail-1.jpg" FullImageUrl="Image-1.jpg" />
<encosia:HighslideImage runat="server" Caption="Image Two"
  ImageUrl="Thumbnail-2.jpg" FullImageUrl="Image-2.jpg" />

HighslideManager properties

ControlBar: Enables or disables the control bar on zoomed images. Default control bar images and CSS are embedded in the control. Optionally, the control bar can be customized via CSS, by overriding the controlbar class.

ControlBarPostition: A ControlBarPositionType property, which allows you to specify where the control bar is overlaid on the enlargement. The options are BottomLeft, BottomRight, TopLeft, and TopRight.

FadeInOut: A boolean which enables a fade effect while the image resizes.

NumberOfImagesToPreload: An integer value which allows you to control how many full size images the script automatically preloads after a thumbnail is enlarged. Setting this property to 0 will disable preloading.

OutlineType: An OutlineType that determines the outline graphic style for all of the images on the page. Defaults to “RoundedWhite” if not specified.

RenderScriptInPlace: A boolean allowing you to control where the Highslide JS script include is rendered. If true, the script include will be placed exactly where the HighslideManager control is located in your document. If false, the script will be included in the head of the document, as usual.

IncludeDefaultCSS: A boolean allowing you to prevent the control from registering any of its default CSS styling. This is useful if you want to provide your own CSS rules to style the Highslide elements. Defaults to true.

HighslideImage properties

HighslideImage extends System.Web.UI.WebControls.Image. All of its standard properties (e.g. ImageURL, Height, Width, etc) remain unchanged and apply to the thumbnail image.

AlternateText: A string specifying the text used for the image’s alt attribute. If this is omitted, then “Thumbnail image for FullImageURL” is used by default.

Caption: A string specifying text to use as a caption on the zoomed image. You can style this with CSS via the .highslide-caption CSS class.

FullImageURL: A string specifying the URL of the “full” size image that will be displayed when the user clicks to zoom in.

LinkTarget: A string specifying the link target of the enclosing <a> tag. This can be used to control the behavior of the thumbnails when a user doesn’t have JavaScript enabled. For example, you could set LinkTarget to “_new” to force non-JavaScript users to see the full image open in a new window/tab instead of navigating the current page to the full image.

TitleText: A string specifying the text to use for the image’s title attribute.

Known issues

When using Highslide JS .NET in a content page, the master page’s <head> element must include the runat=”server” attribute. Otherwise, the control is unable to access it to include Highslide’s CSS.

Changelog

v4.1.4 (6/3/2009)

  • Updated embedded Highslide JS script version to 4.1.4.
  • Added ControlBarPosition property to the HighslideManager, which allows you to position the enlargement’s control bar in any corner of the image.
  • Added several properties (ControlBarPreviousTitle, ControlBarNextTitle, ControlBarMoveTitle, and ControlBarCloseTitle) to control title attributes of links rendered in the control bar. Useful for localization.

v0.7.3 (11/30/2008)

  • Added IncludeDefaultCSS feature.

v0.7.2 (10/24/2008)

  • Updated embedded Highslide version to 4.0.7.

v0.7.1 (5/2/2008)

  • A more descriptive exception is now thrown when the <head> is inaccessible.

v0.7 (4/29/2008)

  • Updated embedded Highslide version to 3.3.17.
  • Improved caption rendering, using inline caption divs, instead of using the onclick parameter. This should result in more semantic markup, pairing your captions with your images.
  • Added HighslideManager property: NumberOfImagesToPreload. This allows you to control how many images are automatically preloaded.
  • Added HighslideManager property: FadeInOut. When true, this fades the enlargement in and out as it’s resizing.
  • Added HighslideManager property: RenderScriptInPlace. This allows you to control where on the page the Highslide JS script is inserted in your page.
  • Updated download to include a sample site, to make it a little easier to get up and running quickly.

v0.5 (1/11/2008)

  • Updated embedded Highslide version to 3.3.6.
  • Cleaned up Alt and Title attribute handling.
  • Added TitleText property to HighslideImage.
  • Added LinkTarget property to HighslideImage.

v0.4 (8/1/2007)

  • Updated embedded Highslide version to 3.2.10.
  • Embedded outlines in the control .dll (you can delete your GraphicsPath!).
  • Removed the GraphicsPath property.

v0.3 (6/3/2007)

  • Added support for the control bar.
  • Updated embedded Highslide version to 3.1.10.

v0.2 (5/5/2007)

  • Added support for replacing ~ with the current context’s application path in FullImageURL and GraphicsPath.
  • Added support for captions on zoomed images, using the Caption property.

v0.1

  • Initial release

Other sites linking to this post

Your comments

Gabriel Rodriguez Subscribed to comments via email
1:44 pm - March 29, 2007

Great control, I just tested it on my personal site, and it works just fine, the only thing i noticed is that it first zooms the image and when its all zoommed, then it adds the outline… i just went to the original highslide page and it seems to zoom both the outline and the picture at the same time. Have you noticed this in your control, or is there any fix for this? Thanks a lot for sharing.

2:07 pm - March 29, 2007

Gabriel, I’m glad you like it.

On my test site, the outline does zoom with the image. It may be something to do with the GraphicsPath and/or the outlines directory.

An easy way to see if anything is having trouble loading is to open it in FireFox with FireBug running, watch the “net” tab, and see if anything is highlighted in red while you load/use the page. If your site is accessible, give me a link to it and I’ll take a look for you if you want.

In the next version, I hope to find a way to include the outline graphics as an embedded resource instead of dealing with it this way.

 
 
Mike Starkey Subscribed to comments via email
7:07 pm - March 29, 2007

Great Work !!! I am using your control and it works very nicely. Any chance of adding captions?

9:37 pm - March 29, 2007

I’m happy that it’s working well for you, Mike.

I’ll definitely be filling out the control with most of the functionality that Highslide JS offers ASAP (which includes captions on the zoomed image).

 
 
Josh Sterling Subscribed to comments via email
2:36 pm - April 10, 2007

Great Control!

Everything related to the control works great but I am having issues with the CSS on my page while using it. It still shows the CSS but it screws with the text sizes, padding, etc.

My web app. is written in C# using external CSS and utilizing master pages.

I can give you a test link if needed.

Thanks.

2:40 pm - April 10, 2007

Hmm, it’s possible that your CSS selectors and the ones Highslide use are conflicting.

Give me that test link, and I’ll take a look at what’s going on. If you’d rather keep the URL private, you can email me through the contact link at the top of the page.

Josh Sterling Subscribed to comments via email
3:34 pm - April 10, 2007

If it is an issue with the CSS would it be possible to change up the CSS in Highslide to use some non-standard CSS?

Thanks, I appreciate it.

8:55 pm - April 10, 2007

I emailed an updated version to your GMail address. Give it a try and let me know if it solves your problem (it should).

Josh Sterling Subscribed to comments via email
12:11 am - April 11, 2007

Thanks Dave!

I really appreciate your help and quick response.

It has solved my problem and everything looks good again :)

May I ask what the problem was?

12:25 am - April 11, 2007

The Highslide CSS had a font size setting for the * selector. That was superseding your CSS rules for the body font size.

There’s no real point to that, so I just removed it from the embedded Highslide CSS.

Thanks for bringing that to my attention.

(Comments wont nest below this level)
 
 
 
 
 
 
Steve Subscribed to comments via email
5:17 pm - April 11, 2007

Hi there. Perhaps I am missing something, but how do I reference the dll? I tried different things but always get the error unknown server tag.

6:19 pm - April 11, 2007

If you’re using a web project, go to the “Website” menu in Visual Studio and choose “Add Reference…” You can locate and reference the dll file through the browse tab of the dialog window.

In your ASPX page(s), use this page directive:

<%@ Register Assembly="HighslideImage" Namespace="Encosia" TagPrefix="encosia" %>

Alternatively, you can add the control to your toolbox by right clicking it, and then drag and drop the controls onto the design view of your ASPX page(s).

Hope that helps.

Steve Subscribed to comments via email
11:14 pm - April 11, 2007

Thanks a bunch! I’ll never have to ask that question again :)

 
 
 
MR Subscribed to comments via email
9:55 am - April 12, 2007

Hi,
A couple of quick questions. First of all thanks for creating the .Net control. Now my questions..
1. Do you have to add each picture individually or can you just link it to the picture folder?
2. Do you have to have thumbnails, or can it create thumbnails automatically?

Thanks

10:21 am - April 12, 2007

1. Each picture needs to have a separate HighslideImage control.
2. The thumbnails need to already exist.

I think #1 is beyond the scope of what I’m trying to do here, but #2 is a great idea. I’ll see about adding that in a future version.

 
 
Steve Subscribed to comments via email
2:44 pm - April 12, 2007

I have built an ashx to generate thumbnails on the fly, I think it would be pretty simple to hook that up to your component. then you can just send one (large image) file name and an option “generate_thumbnail=yes” or something. Write out the thumbnails to disk for caching, then it would be slow only first time.

12:35 pm - April 17, 2007

For that matter, you could also point the ImageURL to the thumbnailing ashx and FullImageURL to the full image.

 
 
Josh Sterling Subscribed to comments via email
5:16 pm - April 17, 2007

Two Things.

1.)In order to get this to work properly I must use this format

Notice the lack of the ~ in the FullImageURL and GraphicsPath command. You cannot add the root symbol ~ to those fields or it parses it as a folder and adds it to the URL. Is this by design?

2.)Is there any plan to add a description field?

Thanks

Joshua Sterling Subscribed to comments via email
5:20 pm - April 17, 2007

Ok, I cant get the code tag to work, sorry.

My 1st question involves the fact that you cant use the ~ in the FullImageURL and GraphicsPath fields but can use in the ThumbURL field.

Sorry again

5:47 pm - April 17, 2007

I just uploaded a new version that should handle the application path (~) character correctly in FullImageURL and GraphicsPath.

Give it a try (download from the regular link above) and let me know if that fixes it for you.

I plan to add a property to caption the images, in the next update. Hopefully, very soon.

Josh Sterling Subscribed to comments via email
12:45 pm - April 23, 2007

The new .dll removes the application path alotogether on my test site.

3:17 pm - April 23, 2007

That’s strange. I changed my test code to this:

<encosia:HighslideManager runat="server" 
  OutlineType="RoundedWhite" GraphicsPath="~/HighslideTest/highslide/" />
<encosia:HighslideImage runat="server" 
  ImageUrl="Thumbnail-1.jpg" FullImageURL="~/HighslideTest/Image-1.jpg" />
<encosia:HighslideImage runat="server" 
  ImageUrl="Thumbnail-2.jpg" FullImageURL="Image-2.jpg" />

The new version handles all of the app paths for that test code.

Could you give me an example of one of the HighslideImage control declarations you’re using, so I can test with exactly the path you are?

 
 
 
 
 
jc
8:14 am - May 16, 2007

Do you think to support the controlbar (NEXT/PREVIOUS/CLOSE) soon ?

1:24 pm - May 16, 2007

I’ll put that on my list of things to do. It shouldn’t be very hard.

jc
1:45 pm - May 16, 2007

Thanks for the answer, do you have an estimated time to add this feature ?

9:40 pm - May 16, 2007

It will probably be a couple of weeks.

 
 
 
 
Teresa Subscribed to comments via email
3:26 pm - June 22, 2007

This code is awesome. One problem I have is that my header is in flash so when my images expand they go under the flash header. Anyone else had this problem or know how to fix it?

Thanks!

Josh Sterling Subscribed to comments via email
4:38 pm - June 22, 2007

Are you using the free version (2.4) of “Flash Control for ASP.Net”?

I have not tested it with the pro version but I have seen this issue as well using te free version.

I am testing some other controls for flash and will let you know.

Anonymous Subscribed to comments via email
4:53 pm - June 22, 2007

I am using the free version. Thank you for your help!

5:49 pm - June 22, 2007

Try adding:

STYLE=”z-index: -1;”

To whatever flash related element you can (its containing DIV, or whatever makes sense in your implementation).

 
 
 
 
3:45 pm - August 1, 2007

Version 0.4 is released and available for download.

Outlines are now self contained in the .dll and you can eliminate the entire GraphicsPath directory (along with that property of the HighslideManager).

Enjoy!

 
Adrian
2:22 am - August 6, 2007

Great control, it just made my life happier!

When will it have support for “hs.expandHtml()” and other good stuff?

8:30 am - August 6, 2007

The full Highslide JS library is included by the HighslideManager control. So, you should be able to use the full range of Highslide JS properties and methods against Highslide JS .NET images.

 
 
9:35 am - August 13, 2007

This controls is perfect. It works like a charm with a data bound control such as the DataList or Repeater.

On one of the sites I’m getting object not set to ….

[NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.]
Encosia.HighslideManager.OnPreRender(EventArgs e) +305
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

Don’t know what’s causing it though. On another site it works just fine.

9:50 am - August 13, 2007

There’s not very much code in HighslideManager.OnPreRender. I’m not sure what would be doing that.

Could you send me the code for that page, so I can step through it in the debugger?

 
 
9:53 am - August 13, 2007

I just found out when I get the nullreference exception.
It happens when you use the control on a child page with a Master Page in ASP.NET 2.0

Any ideas?

 
Riley Subscribed to comments via email
3:29 am - August 16, 2007

hm.. ive tryed to download it from here and the site it originally came from but it doesn’t work :(..

 
3:32 am - August 16, 2007

What do you mean it doesn’t work?
You’ll need this file:
http://encosia.com/controls/highslide/HighslideJS.NET.zip

You will have to create a highslide directory in your web application’s root directory as well.

 
Riley Subscribed to comments via email
4:59 am - August 16, 2007

nope. still doesnt work. it just has 2 files, one is a ‘dll’ and the other is a ‘pdb’

 
Timothy Subscribed to comments via email
5:13 am - August 16, 2007

Yes, and the DLL file is all you need, you add a reference to it from your project. If you’re using Visual Web Developer (Express version is free) or Visual Studio that’s very easy.

Then you can addd the controls to your page,
have you gotten this far? And if so, do you get any excpetions?

 
6:52 am - August 16, 2007

Timothy’s right, Riley. All you need to do is reference that DLL in your page and then you can start using the Highslide JS .NET controls in your page. Assuming you’ve made the reference to the DLL already, add this code to the top of your .aspx:

<%@ Register Assembly="HighslideImage" Namespace="Encosia" TagPrefix="encosia" %>

Then, you can declare the Manager and Images just like in my sample code above.

If you prefer the design mode editor, you can add the DLL to your toolbox and then drag/drop the controls onto your page. Visual Studio will automatically handle the registration for you, in that scenario.

Hope that helps.

 
rasul Subscribed to comments via email
10:20 am - August 18, 2007

Hi, thanks it’s a awesome tools, but i have a problem, when i want to use this dll and add the scripts needed for using that,showing a “loading” text on my thumbnail pic and after clicking twice it shows my image on the onother page? anybody knows why? help me, thanks in advanced

12:44 pm - August 18, 2007

When you say that you add the scripts needed, do you mean you’re manually referencing some of the Highslide JS scripts? If so, drop those. The HighslideManager control embeds all that you need and handles everything automatically for you.

 
 
2:10 pm - August 20, 2007

Hey Dave,

I tried to implement it in an existing site that uses the HttpHandler method discussed above. I set the handler to serve a thumbnail for the ImageUrl, and a full size image for the FullImageUrl.

When I click the image, I get the loading indicator, but that’s it. No JS error, no full size image loads, no HS window opens at all. I use this handler in another page, so I’m sure the code is not in error here.

Any ideas?

3:07 pm - August 20, 2007

NVM….path issue. Works now :)

 
 
martin Subscribed to comments via email
5:53 am - September 6, 2007

Very nice, works great in a repeater…
Any chance of caption allowing html? Either ITemplate or just string html- “AB”…
I’d like to put in a close button (as in http://vikjavev.no/highslide/example-slideshow-captions.html)

11:19 am - September 6, 2007

I haven’t tried passing HTML in to the caption property before. That might work. You’d just need a link/button in your caption that called hs.close(this) in its OnClick.

 
 
martin Subscribed to comments via email
6:53 am - September 13, 2007

BTW you’re using 3.2.1, it’s not up to 3.2.10 yet :)
Torstein fixed some bugs I was experiencing in 3.2.6 (latest is 3.2.7) – when you have time can you upgrade to use the latest? Thanks

10:46 am - September 13, 2007

I updated the download with a version built against 3.2.7. It should work, but I didn’t get a chance to test it. Let me know if you have any trouble.

martin Subscribed to comments via email
4:26 am - September 14, 2007

looks good – my only comment is that the highslide credit shows up (showCredits: true); you had turned it off before.

12:08 pm - September 14, 2007

Oops, sorry. The download is updated with a version that fixes that.

 
 
 
 
martin Subscribed to comments via email
8:20 am - September 17, 2007

i ran into a conflict between HighslideManager and the asp ajax ScriptManager with localization enabled.

The script block gets reused (Page.ClientScript.RegisterClientScriptBlock) so the scriptmanager __cultureinfo gets appended to the hs.registerOverlay. There is a javascript error and highslide can stop working.

The solution is easy- change the RegisterClientscriptBlock for hs.registerOverlay by appending a “;” to terminate the javascript line, so any bits of js that get appended are okay.

2:09 pm - September 17, 2007

I just uploaded a new version that should correct that problem. Thanks for pointing it out to me.

 
 
9:52 am - September 17, 2007

Hi, I would change text language in control bar (NEXT-> AVANTI, PREV -> INDIETRO, CLOSE -> CHIUDI

How can I achieve this?

TIA
Danilo – Padova

2:12 pm - September 17, 2007

For the time being, the best way to use a custom control bar is to create your own control bar div, then call hs.registerOverlay() manually to use the custom control bar.

I plan to allow easier customization of the control bar, but it won’t be in the immediate future.

 
 
Datman Subscribed to comments via email
3:25 pm - September 20, 2007

Try to add the control to the toolbox in vs2005 but all I get is a message telling me that highslideimage.dll is not a .net component.

Anyone else had this problem or any ideas on how to sort the problem.

3:36 pm - September 20, 2007

I just tried adding it to my toolbox in 2005 by dragging and dropping the DLL onto the toolbox pane. That worked for me.

Try downloading the file again, just in case it got corrupted somehow during the download.

 
 
Stefan
2:50 pm - September 28, 2007

Hi, first off, awesome control. I used the orignal javascript version before but yours is just way easier to work with.

The problem I’m having is I’m rewriting some of my URLs for example the page ~/ViewPost.aspx?post=test is rewriting to ~/View/Test.aspx.

The control works fine on pages I don’t rewrite but and soon as I use the rewritten URL the control no longer “Pops up” but just redirects to the full size image. The only thing I can think of is that the reference to the embeded javascript is getting messed up but I have no idea how to fix it.

Any ideas?

Regards
Stefan

4:19 pm - September 28, 2007

If you can, exclude WebResource.axd from rewriting.

 
 
muhanad YOUNIS Subscribed to comments via email
2:49 pm - October 8, 2007

hi there;
thank you very much for this efforts.
here i have a problem that i’m not able to bind the photos with highslid inside datalist. when i show the themp. of the photos i get an excetiopn that says “the photo id that is requested is wrong” and when i debug the system, i found out that handler.ashx is throwing that exception, because the photo id that is passed from the highsilde is wrong. here is my line of code.
<encosia:HighslideImage runat=”server” ImageUrl=’Handler.ashx?PhotoID= &Size=S’ FullImageURL=’Handler.ashx?PhotoID= Size=L’ CssClass=”photo_198″ style=”border:4px solid white” />

the ıd that is sent to the handler is ” <% ” and that is wrong. so how i can solve the problem so the highslide show will request the right id not the server tages!!!
thanks in advanse

5:22 pm - October 8, 2007

I don’t think that came through how you intended. I’m assuming you have some inline script code where the spaces are after PhotoID?

You can use HTML pre tags to post code here.

muhanad YOUNIS Subscribed to comments via email
3:57 pm - October 9, 2007

thank you for your replay; what ever i have done i was not able to do it right. below is the orjinal code that i’m trying to fix to use highslide
a href=’Details.aspx?AlbumID=&Page=’>
<img src=”Handler.ashx?PhotoID=&Size=S” class=”photo_198″ style=”border:4px solid white” alt=’Thumbnail of Photo Number ‘ />

and here is what i have done;

<encosia:HighslideImage ID=”HighslideImage1″ runat=”server” Caption=”slm” CssClass=”photo_198″ FullImageURL=’Handler.ashx?PhotoID=’
ImageUrl=’Handler.ashx?PhotoID=’ />

the point here that i have a handler that return the image url and the id. but when i use highslide image i found out that the handler is not recieving the needed argument! ” <%” is sent to the handler. and that means that the highside is not excepting the binding!.
i hope that we can find a solution for that so it will help you to improve the highslide. thanks again for your help and waiting for your replay

3:59 pm - October 9, 2007

sory the line is like this
ImageUrl=’Handler.ashx?PhotoID=’
comment is not excepting “<%#”. :D

4:00 pm - October 9, 2007

ImageUrl=’Handler.ashx?PhotoID= Eval(”PhotoID”)&Size=S ‘

i removed the server tags

 
 
 
 
 
1:04 am - November 18, 2007

Hi! How to add photos dynamically from code?
Will it be aviable in next versions? I mean somethink like that:

Encosia.HighslideImage hsI = new Encosia.HighslideImage();
hsI.Add(”path1″, “path2″, “caption”);

9:58 am - November 19, 2007

Something like this should work:

Encosia.HighslideImage hsl = new Encosia.HighslideImage();
 
hsl.ImageURL = "thumbnail.jpg";
hsl.FullImageURL = "full.jpg";
hsl.Caption = "My Picture";
 
Page.Controls.Add(hsl);
 
 
1:23 am - November 18, 2007

Also, it would be good to add an opportunity to do databinding to SqlDataSource and XMLDataSource controls. ;-)

10:01 am - November 19, 2007

DataBinding is beyond the scope of this control for the foreseeable future. However, it does work in a DataBound, templated control (Repeater, DataList, GridView, etc).

 
 
10:54 am - December 19, 2007

This control is really awesome. Although I like the idea of DataBinding for this control I have to admit, that my use in a GridView fulfills all my needs atm.
Thanks for the great work :)

 
Chris Haines
5:54 am - December 21, 2007

Hey great control. Any way we can

(1) Change the “Highslide JS” alt tag
(2) Change the “Click to enlarge” title tag
(3) With javascript turned off, force the link to the full-sized image to open in a new window?

Thanks

Chris

9:31 am - December 24, 2007

1. You can do that by putting this JavaScript code anywhere on your page:

hs.showCredits = 0;

2. That’s currently hard coded, but I’ll add a property to set it declaratively in the next build.

3. That’s a good idea. I’ll try to add that in as an option in the next build.

Chris Haines
12:17 pm - January 7, 2008

Thanks Dave

Any idea when the next build will be due?

Chris

10:09 am - January 8, 2008

I’ll try to get one out this week if I can.

 
 
 
 
Netanel Lev Subscribed to comments via email
11:51 am - January 23, 2008

Hi, Great Control!
Is there any way to rotate the images?

1:19 pm - January 23, 2008

Not currently.

Do you want to rotate the image in a sequence or actually rotate it around an axis?

 
 
Chris Haines
5:52 am - February 13, 2008

Hi Dave

We’re having some problems with Operation Aborted in IE. Basically if you click to expand an image before the DOM has finished loading, it causes this serious IE error that then redirects the user to a blank page.

I believe this is a well-known issue with IE if any nodes are manipulated before the DOM has finished loading.

Have you come accross this and got any ideas for work-arounds?

Chris Haines
6:04 am - February 13, 2008

On this…. Waiting for window.onload is a safe bet. However there are times when that is not good enough. The DOM itself is ready for manipulation before window.onload, because window.onload waits for all binary content to also be downloaded… i.e. images et al.

This might be of interest to you …. http://dean.edwards.name/weblog/2005/09/busted/

 
 
Chris Haines
6:05 am - February 13, 2008

Another issue we’re having is cached image sizes. This is a known issue for IE apparently…

http://vikjavev.no/highslide/forum/viewtopic.php?t=791&highlight=flush

However, the work around involves editing the javascript code – which isn’t possible with the encapsulated dll…

guenter Subscribed to comments via email
12:06 pm - April 18, 2008

Hi,
I hope i´ve understand your solve right. (Your link) This solves the problem only for yourself.

But also all users of your website have the same Problem! Once the user load the site, the it remembering image-size.

So you can solve the problem for all user and yourself too:

IE dont remember the image-size if you give the link to the picture a “?” and a random number at the end, i.e. mypicture.jpg?…
This number must always differ! So, the best way is to make it with a timestep:

Change your site-extension from *.htm to *.php, write in the htm-source this php-snippet:


You can also code it in javascript.

guenter Subscribed to comments via email
1:03 pm - April 18, 2008

$timestamp = time();

so you have to make sure there is always a different number at the end of the link

i.e.: full.jpg?var=$timestamp…

 
 
 
Chris Haines
9:36 am - February 13, 2008

One more question — is it possible to change the way the large images display, i.e. to not show an expanding image growing, but rather just immediately show the larger image?

The reason for this is if the smaller image isn’t exactly the same cut / ratio as the larger image, it looks a bit strange when it expands.

 
10:44 am - February 13, 2008

Chris, thanks for the feedback. I’m traveling this week, but I’ll take a look at those issues ASAP when I get back in town.

 
10:59 am - March 19, 2008

I’m using this control in a repeater or datagrid. If number of images is low (about 20 or less) it works fine; but if number of images is higher I have some problems in IE7 (only IE7)

Anyone has problems with IE7 in a page with large number of pictures?

Bye

Luca
Italy

5:41 pm - March 21, 2008

What kind of problem are you having? Slowness? A particular error?

 
Chris Haines
4:54 am - April 1, 2008

I also have experienced slowness with large numbers of image

I think this is (a) due to the browser having to load large number of images! and (b) due to memory leaks… check out your memory usage as you navigate through the site

 
 
4:13 am - April 1, 2008

i got a problem, i use iframe to show pm msg form in a popup way, when the user sumited ,”msg send !”msg shown in the frame,and the highslide popup frame can not closed automatically,(it should be.)and ,when the user click the close tag on the top of highslide popup frame,it closed,but, when u click the same tag which popup the frame cantain pm msg form again, guess what? the “msg send !”msg screen still there!!
i think u guys get what i meant already, i don’t know enough English too make myself clear,but , for u clever guys,maybe it’s enough clear.
help me! pal . if and one nicely give me some help,please contact me @ captaincoo@live.cn

 
Justin
3:09 pm - April 29, 2008

Hey Dave, thanks very much for putting this component together, looks great so far.

The only problem I’m having is that when I put it within an update panel, clicking a thumbnail opens the full image as if you specified the image’s URL in the address bar (e.g. browser navigates to http://www.domain.com/myimage.jpg) instead of performing the normal Highslide expand effect. When I take the control out of the update panel, everything works as expected.

Do you know if there’s a way to include your control within an update panel?

Thanks,
Justin

3:52 pm - April 29, 2008

One of my test cases includes using it in an UpdatePanel, and is working. So, it’s definitely doable.

The behavior you’re seeing usually indicates that the Highslide script isn’t being loaded or is being altered. If you have FireBug, check the net tab and make sure that the WebResource isn’t being blocked or interfered with somehow.

If you want to email me a representative sample, I’ll take a look at it.

 
 
Justin
3:37 am - April 30, 2008

Thanks for the tip Dave, that helped.

The update panel I’m including the component in isn’t visible by default so I don’t think script was being loaded properly once the panel’s visibility property got set to true. Everything started working as expected once I moved the HighslideManager element outside the update panel.

I also tried registering the Highslide script with the script manager to see if that would have the same affect, to no avail. I pointed the script manager to the HighslideImage assembly and all of the possible script names I could find (e.g. “highslide.js”, “highslide.packed.js”, “highslide-full.js”, etc.) but was never able to find the right combo.

If it’s not too much trouble, would you mind letting me know the name of the script you’ve compiled into the assembly or better yet, how I might be able to find it in Firebug?

Thanks again for your help and your terrific control!

Justin

10:23 am - May 2, 2008

The embedded script name is highslide.min.js, but you’ll see it come down in a WebResource.axd call. It’ll be the one that begins with “var hs={”.

I’d suggest placing the HighslideManager outside the UpdatePanel. It and the HighslideImages don’t need to be in any particular proximity to each other. The way the Highslide script works, it doesn’t need to be injected by the same response that makes the images visible.

 
 
Rasul Subscribed to comments via email
5:05 am - June 7, 2008

Hi I want to know why it’s impossible to use your beautiful component with a tag like:
‘< %# Eval("Filename", "Gallery/{0}") %>‘
could you help me?

1:03 pm - June 7, 2008

You can use it in an ITemplated databound control. A very basic Repeater sample, for example:

protected void Page_Load(object sender, EventArgs e)
{
  Hashtable imgs = new Hashtable();
 
  imgs.Add("~/img/encosia-thumb.jpg", "~/img/encosia-full.jpg");
  imgs.Add("~/img/highslide-usage-thumb.jpg", "~/img/highslide-usage-full.jpg");
 
  Images.DataSource = imgs;
  Images.DataBind();
}
<asp:Repeater runat="server" ID="Images">
  <ItemTemplate>
    <encosia:HighslideImage runat="server" 
      ImageUrl='<%# Eval("Key") %>'
      FullImageURL='<%# Eval("Value") %>' />
  </ItemTemplate>    
</asp:Repeater>
 
 
Rasul Subscribed to comments via email
3:14 pm - June 7, 2008

Sorry i think that i forgor the highslide manger, but i wanna know that could you share the assembly, is there any way to change the control bar style?

 
Mario Subscribed to comments via email
2:14 am - July 17, 2008

Hey there,

Im using your control, and it working fine.
I have a masterpage, and i added the runat=server to my head-tag (like you suggested).
However my pages doesn’t show the title anymore (now i have the “Untitled Page” on each page)

Is this an know error? Do you know any workaround this?

my head tag now

Behind The Border

Thank you,

Mario Subscribed to comments via email
2:15 am - July 17, 2008

Behind The Border

 
Mario Subscribed to comments via email
2:16 am - July 17, 2008

Sorry tag didn’t paste correctly, let me know if you want to see my head tag.

 
Mario Subscribed to comments via email
2:23 am - July 17, 2008

Oke found the problem, have to specify on each page in the masterpage-tag the Title again.

10:57 am - July 17, 2008

That sounds like the issue that comes up when the Master’s <head> doesn’t have a runat=”server” attribute. Without that, if the control is located in a content page, it can’t register Highslide’s CSS on the Master.

So, you might be able to just add that and fix it without having to re-add title tags on the content pages.

 
 
 
Doug Subscribed to comments via email
1:34 pm - August 30, 2008

This control is great! How do I go about centering the full image in the browser?

TIA

 
eduard
3:59 pm - September 10, 2008

Hi everyone. I am trying to get the same control load few images. Sort of an array of images. Does anyone know? Thanks

 
7:09 am - September 23, 2008

Has anybody been able to get this working with the ASP.NET MVC framework?

7:52 am - September 23, 2008

I haven’t tried it, but it shouldn’t be entirely impossible for it to work with MVC. It doesn’t require ASP.NET AJAX and it doesn’t rely on the postback model at all.

Did you try it with ASP.NET MVC and have trouble?

 
 
7:59 am - September 23, 2008

(Something wrong with the comments, not seeing what the mail described… anyway…)

While using it in a MVC view, the images are simply downloaded when you click on them… I’ll check it again…

8:03 am - September 23, 2008

(Caching)

That makes sense. I’m registering the script using a method of the “Page”, which wouldn’t be available in MVC.

I’m planning on updating it with the v4.0 Highslide JS ASAP anyway. I’ll address MVC support at the same time. Shouldn’t be difficult.

 
 
10:17 am - October 8, 2008

This is the exactly what I needed. Thanks so much to you and Torstein for this awesome control!

 
Ron
12:12 am - November 9, 2008

Hi,
Can I use this control to open a aspx on top of the page? like the modal dialog in ajax toolkit?
Any sample to opening html (or any other) page?

Thanks,
Ron

9:35 pm - November 17, 2008

Highslide does offer that sort of functionality, but I haven’t included a .NET interface to it (yet).

 
 
5:19 pm - November 24, 2008

I have this working a treat (thanks!), but I want to use a different icon set for the controls. I know the CSS I need to use from a previous implementation of HS but I’m having trouble knowing exactly how to get it to work with this control.

I’ve used RenderScriptInPlace=”false” which results in the to the CSS file being output in the head, but as the very last thing in the head. This means the .controlbar styles in it override mine in a CSS file called before it.

If I put them in a block in the body of the page it works, but that of course is not good practice.

I have tried changing the specificity of my selectors by using the ID of a containing div, e.g.

#frame .controlbar

but that’s not making a difference.

Do you have an example of how to do it?

Thanks

1:20 pm - November 30, 2008

I just added a property, IncludeDefaultCSS, to the HighslideManager class to prevent it from registering the default CSS include. If you set that to false, you can provide your own, custom CSS without it interfering.

Rob Kittredge
5:15 pm - December 8, 2008

Hi, I just downloaded the new version that is supposed to have the IncludeDefaultCSS property, but it does not. After further investigation the dll that is included in the new file still says 7.2 not 7.3?

Thank you for your work on this excellent tool!

5:29 pm - December 8, 2008

The version linked above is correct now. Sorry about that. Thanks for making me aware of it.

 
 
 
 
10:13 am - December 14, 2008

Thanks for resolving my last issue in v7.3, now I have another one for you.

The link to the stylesheet is something like

… &t= …

Unfortunately the ampersand causes the page to fail XHTML validation. Could it be changed to

… &amp;t= …

which is how other resource libraries are loaded by asp.net by the looks of things?

Thanks!

Huw

Huw Millington
10:17 am - December 14, 2008

I’m making a right mess of this!

I’ll start again:

Could the ampoersand in the call to the CSS

 

be changed to

 ... &amp;t= ...
 
 
dachir
8:35 am - January 12, 2009

do the control work only on image? what about form, html ajex and so on?

9:34 am - January 12, 2009

Currently, just images.

 
 
dachir
2:26 pm - January 12, 2009

just to bad.

 
Stefan Krüger Subscribed to comments via email
9:34 am - January 18, 2009

Phantastic control!

Please allow me two questions:

- how can i change the controlbar text (previous next…) to german

- is it possible to create a semi-transparent background behind the enlarged image?

Thanks
Stefan

 
4:59 pm - January 20, 2009

Hi,

nice control to use highslide, but I have one problem with it. I am trying to use it “programmatically”, but it should be with using rendercontrol. RenderControl on HighslideManager just went OK, but when I try on HighslideImage I got this error:

[NullReferenceException: Object reference not set to an instance of an object.]
Encosia.HighslideImage.Render(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
Render.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\zju3.com\Render.aspx.vb:62
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

This is how I try to render control:

Dim eimg As New Encosia.HighslideImage
eimg.ID = “ImageE”
eimg.ImageUrl = “~/Thumb_2.jpg”
eimg.FullImageURL = “~/2.jpg”
eimg.Caption = “Naslov”
eimg.AlternateText = “Text”

Dim SB As New StringBuilder()
Dim SW As New StringWriter(SB)
Dim htmlTW As New HtmlTextWriter(SW)
eimg.RenderControl(htmlTW)

Looking forward to hearing from you and thank you in advance.

5:13 pm - January 20, 2009

I’m able to reproduce that error. The reason is because the control uses the instance of the Page on which it resides to call ResolveUrl(). When you imperatively render it, the control doesn’t have a Page instance within that context.

I might be able to rework that bit, but I still don’t think it would work if you’re rendering the controls to strings. The HighslideManager needs to be able to register JS and CSS, which doesn’t happen in its Render event (nor is part of its directly rendered output).

 
 
5:07 am - January 21, 2009

Thanks.
The reason why I want to render to string is that i am using REGEX match and then Replace. For example I have this text string “This is my photo [hgal:2] from somewhere”, then I want to make replacement with eimg control for [hgal:2] (above code) … of course in real example there are many replacements. That is why I am using REGEX match.

CODE:
Public Shared ReadOnly REGEX As New Regex(”\[hgal:(.*?)\]“, RegexOptions.Compiled Or RegexOptions.IgnoreCase)

Public Shared Sub ReRender(ByVal txt As String)
If Not txt.Contains(”[hgal:”) Then
Exit Sub
End If

For Each match As Match In REGEX.Matches(txt)
Dim photoId As String = match.Groups(1).Value.Trim()
Dim embed As String = RenderHtml(photoId)
txt = txt.Replace(match.Groups(0).Value, embed)
Next
End Sub

Please note RenderHtml calls rendercontrol function.

Any other possible way to do this kind of replacement using your control?

 
12:52 am - February 26, 2009

I look forward to using this control. Something strange on my implementation, or maybe I am missing something basic. When using the code as you suggest OutlineType=”RoundedWhite” or removing this tag, when you click on the image to zoom, the image hangs with a loading image. However, when I put =beveled the control works fine.

Am I missing something? What are the options for the OutlineType ? Is this an issue on how I am using the control?

Thank you
pw

12:59 am - February 26, 2009

That’s strange. You should only be presented with the four valid OutlineTypes (Beveled, DropShadow, OuterGlow, and RoundedWhite) as options there.

It retrieves those outline images from the assembly using a WebResource.axd handler. Can you check in Firebug’s net tab (or something like it) and make sure there aren’t any 40x errors related to the WebResource.axd requests?

 
 
3:29 am - February 26, 2009

Good day sir,

First off I would like to say thanks to this amazing control! Tried using it today, I added the images dynamically by doing a recursive directory search on my images folder and parsed the file individually, I pasted the code behind that I created in doing this, one thing dear sir, is there a way of displaying the full size of the image? for now I could see that its constricted to a certain size.
Thanks again.

Sincerely,
gbert

Private Sub GetImages()
Dim files() As String
Dim filethumb() As String
Dim i As Integer
files = Directory.GetFiles(Server.MapPath(”~/medrecord/100016″), “L_*.jpg”, SearchOption.AllDirectories)
filethumb = Directory.GetFiles(Server.MapPath(”~/medrecord/100016″), “sm_*.jpg”, SearchOption.AllDirectories)

For i = 0 To files.Length – 1
Dim lbl As New Label

Dim TrimPath As String = files(i)
Dim sTrimPath As String = filethumb(i)
TrimPath = TrimPath.Substring(TrimPath.IndexOf(”medrecord”)).Replace(”\”, “/”)
sTrimPath = sTrimPath.Substring(sTrimPath.IndexOf(”medrecord”)).Replace(”\”, “/”)
Dim s As String = “

lbl.Text = s ‘the string is displayed as HTML on the panel on the web form named PnlThumbs
PnlThumbs.Controls.Add(lbl)
Next

End Sub

4:59 pm - February 26, 2009

I’m not sure that I understand what you’re asking. If you’re looking for automatic thumbnailing, that’s outside of the scope of this control. You could do that fairly easily with an ashx handler though.

8:53 pm - February 26, 2009

thanks for the fast reply sir! Concerning my issue, I was just wondering if I could make it display the actual size of the image (w/c is at 1277×1755dpi), as I could see now, the size of the pop up image is restricted by the browser’s window (viewport) or at width:400 (I think). Is there a way to override this behavior?
Thanks again sir for giving the time to answer my post.

sincerely,
gbert

 
 
 
Stefan Krüger Subscribed to comments via email
4:22 am - February 26, 2009

I asked some weeks ago, if it would be possible to change the (hover) texts in the enlarged images (previous next and so on) to something else (in my case to german)

Thank you for your help
Stefan

4:57 pm - February 26, 2009

I don’t believe so (at least not easily) currently, but something that I’m working on will allow you to customize that soon.

 
 
7:27 pm - February 26, 2009

Another question. I am able to get the beveled outlinetype to work the way we want. However, the image covers the next/previous/close icons in the upper right of the image. Is there a setting we need to set to have the icons on top of the image? Maybe we need to resize the image within the control?

I am using the controlbar=”True”. It appears weather this is true or false, I get the same results.

Thank you
Patrick

8:07 pm - February 26, 2009

This is going to be related to the same issue that I emailed you about (WebResource.axd resulting in a 404 on your server).

 
 
Bubba
8:26 pm - March 5, 2009

I am a .NET programmer – trying to use HighSlide without many problems. Thought about trying your control.

We are not using HighSlide to display images – but to contain regular asp.net controls that appear to pop up.

Have you tried your .NET control with this?

Thanks

Bubba

12:18 am - March 6, 2009

Unfortunately, not yet. Just images.

 
 
4:33 am - March 10, 2009

hi,
iam using highslide control for displaying images in datalist control.Iam generating thumbnails dynamically and setting path for imageurl and for fullimageurl iam displaying original image. But the problem is thumnails and not displaying in datalist. But in zooming original image is displaying. Pls can u tell me where is the problem?

code: DataList1_ItemDataBound
HighslideImage img = (HighslideImage)e.Item.FindControl(”img”);
img.FullImageURL = img.FullImageURL = ConfigurationManager.AppSettings["ImagePath"] + img.ImageUrl.ToString();
img.ImageUrl = (”Thumbnail.aspx?name=”, ConfigurationManager.AppSettings["ImagePath"] + img.ImageUrl.ToString());

where “imagepath” is a path where iam storing images within a network

<encosia:HighslideImage ID=”imgDownload” runat=”server” ImageUrl=” />

Thanks in advance

joohitha

9:07 am - March 10, 2009

I believe your thumbnailer will need to be an ASHX handler for that to work, not an ASPX page.

 
 
alen
5:20 am - March 11, 2009

hi,

nice control to use highslide, but I have one problem.Instead of using zoomout in ur control can i write my own java script to code for zoom out. like on mouseout event can i write javascipt code for zoomout.

function zoomout()
{
HighslideImage.style.width=100px;
HighslideImage.style.height=100px;
}

thks
alen

 
not2cre8ive Subscribed to comments via email
10:24 pm - March 11, 2009

Great control!

Hopefully just a simple question…

I was just wondering if you had a list of descriptions for all the properties of HighslideManager and HighslideImage in the current version.

Thanks.

8:46 pm - March 15, 2009

The properties described above are kept up to date. Keep in mind that the HighslideImage control additionally has all of the properties of the usual asp:Image control. Those are unchanged in HighslideImage.

 
 
prakash Subscribed to comments via email
2:56 am - March 12, 2009

hi,

nice control to use highslide, but I have one problem.How do i zoomout the zoomed in images on click on any part of the webpage…

Presently if we click on the zoomed image only the image gets zoomed out..

8:44 pm - March 15, 2009

By default, that’s not how Highslide works. You could write some custom JavaScript to trigger the appropriate event when clicking in other elements, but that’s beyond the scope of this control.

 
 
karla
4:47 am - March 12, 2009

hi,

great control

 
alex Subscribed to comments via email
6:55 am - March 18, 2009

Hi! I have this problem:

in your example the Page Language is “C#” and it works all correctly.
But, my page language is “VB” and I try the example and it doesn’t works.

Could you show the same example in VB? please…
or writing me how can I do?

I try several hours but, nothing!

Please help me!

 
Dave Subscribed to comments via email
12:34 pm - March 30, 2009

Love the control!

My question is, is it currently possible or will future releases support the positioning of the full sized image? Right now it appears directly over the image that was clicked on.

If have a colum of images along the left side of the page and would like the full sized image to be offset to the right of the thumbnails, thus keeping the thumnails visible.

 
3:11 am - April 8, 2009

Hi,
I have 0.7.3 version it doesn’t accepts data from database in Datagrid whereas tags shows image and images on loading fall behind the flash header footers please help i am using free version

 
3:13 am - April 8, 2009

one more thing there is an javascript error icon on my page that says this._form is null or not an object

 
3:19 pm - April 24, 2009

I am using Highslide for .NET. I am implementing Highslide Gallery with Thumbstrip above the image, subsequent thumbnails hidden. The image renders but the Javascript doesn’t seem to be rendering. This is a ASP.NET C# application. I could really use your help. Thanks

Here is the code:

hs.graphicsDir = ‘/images/highslide/graphics/’;
hs.align = ‘center’;
hs.transitions = ['expand', 'crossfade'];
hs.fadeInOut = true;
hs.outlineType = ‘glossy-dark’;
hs.wrapperClassName = ‘dark’;
hs.captionEval = ‘this.a.title’;
hs.numberPosition = ‘caption’;
hs.useBox = true;
hs.width = 600;
hs.height = 400;
//hs.dimmingOpacity = 0.8;

// Add the slideshow providing the controlbar and the thumbstrip
hs.addSlideshow({
//slideshowGroup: ‘group1′,
interval: 5000,
repeat: false,
useControls: true,
fixedControls: ‘fit’,
overlayOptions: {
position: ‘bottom center’,
opacity: .75,
hideOnMouseOut: true
},
thumbstrip: {
position: ‘above’,
mode: ‘horizontal’,
relativeTo: ‘expander’
}
});

// Make all images animate to the one visible thumbnail
var miniGalleryOptions1 = {
thumbnailId: ‘thumb1′
}

Testimonials

Client Testimonials
Case Study 1
Case Study 2
Case Study 3
Case Study 4
Case Study 5

Take an interactive tour



Success snippet one

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut
aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in
vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla
facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent
luptatum zzril delenit augue duis dolore te feugait nulla.

Success snippet two

Li Europan lingues es membres del sam familie. Lor separat existentie es un myth.
Por scientie, musica, sport etc., li tot Europa usa li sam vocabularium. Li lingues
differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos
directe al desirabilit de un nov lingua franca: on refusa continuar payar custosi
traductores. It solmen va esser necessi far uniform grammatica, pronunciation e
plu sommun.

I have written the javascript include in the aspx.cs file on the onLoad function:

protected void Page_Load()
{
Header.InnerHtml = “”;
}

 
Mike Clarke Subscribed to comments via email
9:33 am - June 6, 2009

I am evaluating the Highslide .NET component on my photo gallery website and what I want to know is how implement a facility to update an image counter when an image is shown?

I have created a new usercontrol that inherits the Encosia.HighslideImage, but how to I override the click event so I can call my own method to update the image counter for the image that is being shown in the window?

Thanks in advance.

11:57 am - June 6, 2009

Since there isn’t an OnClick event firing on the server side, it’s not as simple as overriding an event. You could change how the client-side onclick renders, to fire a callback on enlargements, but I’m not sure that would be very reliable.

The easiest way to accomplish this might be to serve your images through an ASHX handler which updates a view counter every time it serves an image.

 
 
Mike Clarke Subscribed to comments via email
2:00 pm - June 6, 2009

Thanks for the comments Dave. I will try going down the ASHX route as this does sound the better solution.

Thanks again.

 
Mike Clarke Subscribed to comments via email
2:16 pm - June 6, 2009

Dave, just realised that using an ASHX handler is not going to work for me, unless I am missing something.

Basically, when I have got is a photo gallery and when the user selects an image and it is expanded I want to update the view count for that image.

If I used an ASHX handler to serve the image it will update the view counter for all images when the page loads rather than when the user clicks on the image.

I am looking to modify the highslide.js script to create an additional function to use AJAX and call a web service to perform the update of the view counter.

Regards.

3:07 pm - June 6, 2009

If you set the HighslideManager’s NumberOfImagesToPreload to 0 and only increment your counters when the ASHX serves the enlarged image, you should get an accurate count.

 
 
Mike Clarke Subscribed to comments via email
5:08 am - June 7, 2009

Hi I have just tried your suggestion and set NumberOfImagesToPreload to 0.

It is almost working now. Instead of a single image being served when I expand an image it is serving two images and updating the counter for both images.

When I put a breakpoint in the ASHX code it is doing it twice instead of the once as it should.

Is there anything else I need to do to stop this from happening?

 
Mike Clarke Subscribed to comments via email
6:10 am - June 7, 2009

Also, the handler stops getting served once all images are clicked on. It seems Highslide is caching the images once they have loaded.

I guess the only true way of updating the image count is by modifying the javascript code and create another expand method to do just this.

12:33 pm - June 7, 2009

I don’t think it’s going to be as robust as getting the handler working, but you could try using the base library’s onAfterExpand event to make a callback to your counter.

I haven’t included that part of Highslide in the embedded JavaScript though, to minimize the payload size. If you’d like me to compile a version of the control that includes the events portion of Highslide, I can.

Send me an email if so (I think we’re beyond the scope of the comments on the control itself here).

 
 
Dave Subscribed to comments via email
11:43 am - June 7, 2009

I’ve asked this question before. Will there be a future enhancement to control where the image is positioned? I’d really like to have the image centered in the middle of the page. Also a property to specify click vs hoverover.

Thanks

12:19 pm - June 7, 2009

Sorry, I missed your question earlier.

You could use the hs.marginLeft property of the base library to avoid the images positioning over your strip of thumbnails.

 
 
Dave Subscribed to comments via email
3:43 pm - June 7, 2009

I already got the full blown hs libray in production and doing the centering and onclick. I was just hoping for something “property settings” wise, to make life easier.

thanks

3:48 pm - June 7, 2009

You can still use the control to make everything else simple. Just include a script element like this somewhere after the embedded script reference that HighslideManager renders:

<script type="text/javascript">
     // Overrides Highslide JS .NET's default.
     hs.marginLeft = 200;
</script>
 
 
Mike Clarke Subscribed to comments via email
3:49 pm - June 7, 2009

Property settings are a good idea, but if it is possible to include events as well it would make the component a lot more flexible.

Looking forward to the next version :)

Regards.

 
Dave Subscribed to comments via email
5:55 pm - June 8, 2009

Dave, I’ll pay you to do that for me. How much. :-)

 
cengiz canturk Subscribed to comments via email
1:03 am - June 28, 2009

is there a way to change zoomed image TitleText?

11:48 am - June 28, 2009

The bit that says “Click to close image, click and drag to move. Use arrow keys for next and previous”?

 
 
cengiz canturk Subscribed to comments via email
12:41 pm - June 28, 2009

yes. i couldn’t find how can i change it.

12:51 pm - June 28, 2009

The control doesn’t directly expose that right now. What you can do is add this script somewhere toward the end of your page:

<script type="text/javascript">
  hs.lang.restoreTitle = 'Click to close image.';
</script>

And that title will be changed to “Click to close image.”

 
 
cengiz canturk Subscribed to comments via email
2:29 pm - June 28, 2009

thank u. i was looking for this.

 
Name
Email (never shown publicly)
Website

Basic HTML is allowed (e.g. <a>, <blockquote>, <strong>, <em>, etc).

To post formatted code blocks, use <pre lang="x">code</pre>, where x is asp, csharp, html, javascript, or xml.

Your Comment (smaller size | larger size)