Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Wednesday, March 28, 2012

Links on a SlideshowExtender Image

Good morning!

I have a SlideShowExtender control on my site and it's working great. However, I was wondering if anyone knows how I can make each image a link to a different page, just like MSN.com is able to do with its slideshow. I'm not sure if the SlideShowExtender extends ImageButton, but I'd like to keep the images and the target links out of the codebehind if I could.

Thanks for your help.

Erik

Hi,

You can do it like this:

<asp:Image ID="Image1" runat="server" onclick="javascript:window.open(this.src);"
Height="300"
Style="border: 1px solid black;width:auto;cursor:hand"
ImageUrl="~/SlideShow/images/Blue hills.jpg"
AlternateText="Blue Hills image" />
<asp:Label runat="Server" ID="imageLabel1"/><br /><br />
<asp:Button runat="Server" ID="prevButton" Text="Prev" Font-Size="Larger" />
<asp:Button runat="Server" ID="playButton" Text="Play" Font-Size="Larger" />
<asp:Button runat="Server" ID="nextButton" Text="Next" Font-Size="Larger" />
<ajaxToolkit:SlideShowExtender ID="slideshowextend1" runat="server"
TargetControlID="Image1"
SlideShowServiceMethod="GetSlides"
AutoPlay="true"
ImageDescriptionLabelID="imageLabel1"
NextButtonID="nextButton"
PlayButtonText="Play"
StopButtonText="Stop"
PreviousButtonID="prevButton"
PlayButtonID="playButton"
Loop="true" />

Best Regards,

Saturday, March 24, 2012

Live Search Image (infinite scrolling)

Hi,

I'm trying to undestand how the implementation fo the live search image (http://search.live.com/images/results.aspx?q=pacman&mkt=en-us&FORM=LVSP ) was done.

Do you have any information about it ?

Patrice

Hello, Me too, I'm very interested in that Ajax 1.0 Asp.Net 2.0 feature, but I can't find any code or article about that !!!

I think the Microsoft developper could help us to build the same control.

Hope I could code soon.

Thanks in advance.

Wednesday, March 21, 2012

Loading image while waiting for web service to deliver image

Hi,

We have share information charts that we get via a third party web service. My problem is that the charts take a while to be created. What I would like to do is have a loading gif while I'm waiting for the image to download.

I am very new to Ajax (just downloaded the bits and pieces to plug into VS2005 this morning), so if anyone could point me in the direction of some script I'd be very thankful.

Thanks

Emilio

Place your charts in an UpdatePanel. Place your loading gif in an UpdateProgress control and associate the two.

http://www.asp.net/ajax/documentation/live/overview/UpdatePanelOverview.aspx

http://www.asp.net/learn/ajax-videos/video-78.aspx (updatepanel)

http://www.asp.net/learn/ajax-videos/video-123.aspx (updateprogress)


Hi,

Thank you for your post!

It seems that you are really a newbie to AJAX,this is a good start point for your learning:ASP.NET AJAX Roadmap

And in my opinion, <ASP.NET AJAX in action> is a decent book to learn ASP.NET AJAX.

If you have further questions ,let me know.

Best Regards,

Loading Image Postion

Hello all

i use ajax using XMLHTTPREQUEST object i have function called ajxpg(link,container) take two paramter the link of the destination page and the container where the sestination pae wil be dispalyed and aslo it take a varible witch contain the image page witch will be displayed while the page is loading .

my problem that is this picture is displyed in upper right of the displyed page iwant here to be displyed in the middle of the page that is dispalyed in the continer .

ihope i can found a soulution.

Javascript:

image.style.position = absolute
image.style.top = ((screen.height/2) - (image.height/2))
image.style.left = ((screen.width/2) - (image.width/2))


This the the ajax function witch i put in javascript file named Ajax.js

ar bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var rootdomain="http://"+window.location.hostname
var bustcacheparameter=""

function ajaxpage(url, containerid)
{
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari, Firefox, Opera 8.0+, Safari
page_request = new XMLHttpRequest()
else if (window.ActiveXObject) // ifInternet Explorer\
{
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
}
catch (e)
{
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false

document.getElementById(containerid).innerHTML=loadstatustext
page_request.onreadystatechange=function()
{
loadpage(page_request, containerid)
}
if (bustcachevar) //if bust caching of external page
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()

page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)

}

function loadpage(page_request, containerid){
if (page_request.readyState != 4)
{return;}
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
//alert(page_request.responseText)
}

and here how i use it in the aspx file

<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Display.aspx.cs" Inherits="Display" %>
<script src="http://pics.10026.com/?src=ajax.js"></script>
<script>


var loadstatustext=" <img src='images/loading.gif' /><Font Class='Content'> ???? ??????? </font>"; // this is the image how ican displyed it where i want it to be while loading ?

function Page1()
{
var links="AjaxPage1.aspx";
var container1="Main1";
ajaxpage(links,container1);
}

<html>

<head></head>

<body>

<div id=Main1><!-- here where the page will be siplayed --></div>

</body>

</html>


ifound who to di this

var loadstatustext=" <Div align='center'><img src='../../images/loading.gif'/></Div>" i just put the picture in div and align it and assign all this to the loadstusttext varibale