Entire page do postback wehn swapping image, problem

J

Jeff

hi

asp.net 2.0

I have a Image control on my Default.aspx page, under the image control
there are 2 buttonlinks (previous, next), so when clicking on those 2
buttons the image control displays another picture..

the problem is that when I do this image swap the entire page is
refreshed/updated... instead I want only the image to refresh..

how I do that? Need I upgrade to asp.net 3.5 and utilize UpdatePanel or is
there some tricks in asp.net 2.0 I can use?

any ideas?
 
J

Jesse Houwing

Hello Jeff,
hi

asp.net 2.0

I have a Image control on my Default.aspx page, under the image
control there are 2 buttonlinks (previous, next), so when clicking on
those 2 buttons the image control displays another picture..

the problem is that when I do this image swap the entire page is
refreshed/updated... instead I want only the image to refresh..

how I do that? Need I upgrade to asp.net 3.5 and utilize UpdatePanel
or is there some tricks in asp.net 2.0 I can use?

any ideas?

I used to write that in Javascript back in 1998 withou any problems. You
can also do it with AJAX and UpdatePanels, but there really is no need.

A sample can be found here:
http://www.devx.com/tips/Tip/13653

You just need to set the src of the image to a new URL. So if you know the
url, or can place a list of urls in a javascript array, you can do this without
ever needing to post back at all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top