Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Entire page do postback wehn swapping image, problem

Reply
Thread Tools

Entire page do postback wehn swapping image, problem

 
 
Jeff
Guest
Posts: n/a
 
      04-19-2009
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?


 
Reply With Quote
 
 
 
 
Chris Taylor
Guest
Posts: n/a
 
      04-19-2009
Hi,

You can use the ASP.NET Ajax extensions for 2.0, which can be downloaded at
http://www.microsoft.com/downloads/d...displaylang=en

Hope that helps

--
Chris Taylor
http://taylorza.blogspot.com
http://dotnetjunkies.com/weblog/chris.taylor



"Jeff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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?
>

 
Reply With Quote
 
 
 
 
Jesse Houwing
Guest
Posts: n/a
 
      04-19-2009
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.

--
Jesse Houwing
jesse.houwing at sogeti.nl


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
swapping iframes within same page richard HTML 8 10-30-2006 10:50 PM
refreshing control data on a page, without the entire page re-loading Milsnips ASP .Net 1 05-16-2005 10:35 AM
Postback and process entire datagrid at once Sjaakie Helderhorst ASP .Net 0 06-03-2004 09:48 AM
Re: Problems with PostBack events when swapping dynamically loaded controls in a page Peter Jaffe ASP .Net 0 02-04-2004 12:06 PM



Advertisments