2.0 OnClientClick imageButton problem.

Here's the sample url:
I'm having a problem with getting the onClientClick to work. As you can see on the page, there is images and I have set all their URL's dynamically so that they link to the product descriptions. However, it doesn't seem to be working as you can see in the url. It just posts back to the same page. The page pops up with a script error at the exact location of the imageButton. Any ideas as to what's causing my problem?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Does your OnClientClick reference a JavaScript? OnClientClick is used for client side scripting OnClick is used for server side scripting. What is your script handled OnClientClick?
The javascript in the onClientClick is incorrect

it should be like this:
onclick="document.location.href = ' Sample by Meyda Tiffany_13494513.html';"
My other thought is that if all you want to do is link to another page you can use the PostBackUrl of the ImageButton to just enter a link. This can also be bound to if necessary.
If all you need is to direct user to another page upon click, then use HyperLink instead of ImageButton. Set HyperLink's ImageUrl to the product's picture and set NavigateUrl to the destination url which can be constructed dynamically.
The ImageButton control will cause postbacks, but HyperLink control will not.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jumpstart0321Author Commented:
Thanks for all the help guys. I didn't reference anyexternal javascript, however; I believe the control automatically makes its own javascript at runtime. I tried the PostBackURL and got the same result. I took prariedog's suggestion and just used a basic <a href... control. Much easier and I'm sure it will be more SEO compatible. Thanks again guys.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.