Hi,
the problem is not solved - but I did a workaround which works.
Maybe someone else has this problem - so I'll share the solutins here.
Inspecting the rendered layout of the rotator I found (guessed) it would not be so easy to "reduce" the clickable area.
I'm mor the "desktop C# guy" - so messing around with jscript, css and all this funny things is not what I like :)
So I decided to ignore the rotators click - and make the thing rotating clickable.
This is not to hard to achive - and it gives great flexibility on "where you can click".
My app works with a DB but for easier understanding I some (nasty I know :)) "string machting" here.
Anyhow - the approach should fit any (normal) scenario.
I have my rotating content - and this thing displays something.
The rotator binds some kind of a "ID" (path to image, string to display, whatever) to it.
In my case I show up a thumpnail, a title below it and some description next to it.
To make the thing "clickable" (in an easy manner) simply create a usercontrol out of it.
Here is my Control (ObjectID is a string - in this sample it matches the image filename - part of it).
So what does it do - it builds a simple layout with a table.
In Code behind it binds the values - that's it.
And it has a public property "ObjectID" where I can bind a string.
RadRotator looks like this
Also very simple for this sample.
So now - how to handle the clicks?
First of all - make the UserControl clickable.
I simply place a div around the table I showes formerly.
Of course I could do this with my image, some table row or whatever..
IMPORTANT: notice that I use double quotation marks on all the places.
Normaly I do xxx='<%.....%>' at least when I have quotation marks inside the "code".
But in the case this would result in a jscript error!!
The reason Page.GetPostBackEventReference results in something like __doPostBack('ctk.....','')
The final result would be onclick='javascript:__doPostBack('ctl...','')'
So it would give you an error.
What we have got so far - we injected a postback for the onclick of the div.
Now (of course) we have to handle this in code behind.
There is an interface for this - IPostBackEventHandler.
I guess this code is very straight - no need to comment it :)
Last no least the changes to my rotator.
First of all attach the onclick event.
Don't expect designer support (or intellisense) - at least for me there is nothing there - but it is not hard to do it.
Just write OnClick - and assign a method name.
In code behind have the handler.
In my case it will open a "view details page" - and for SEO (user friendly locking URLs) it does URLRewriting.
So /..../IDofMyObject_Details. is in reality /.../ObjectDetail.aspx?ObjectID=IDofMyObject
Thats it.
I'm afraid that some telerik guy will answer this thread with something like
Simply use this CSS so the blank areas will no longer be clickable...
:))
Anyhow I think an approach like this could be usefull - especially if you would like to achive "special things" like that only a part of your rotated thing should be clickable.
Or for an example if you want some areas to do differnt things.
Page.GetPostBackEventReference has an overload where you can specify a string which will be passed to the RaisePostBackEvent Method.
So you place more of this Page.GetPostBackEventReference on your control - and in the handler you evaluate the string and do different things depending on the values.
Maybe this post is helpfull for someone.
For me the RadRotator problem is solved (I'll stay on this approach) BUT I'm still interested in an answer from telerik if there is some "correct" solution to avoid "empty space clicks".
Regards
Manfred