Question Image not Displaying properly

pactools

Member
Joined
Jan 18, 2011
Messages
8
Programming Experience
Beginner
I am trying to change the Impage at certain time interval(5 images),images are displaying quite good in my machine when i launched same application in windows server2008-IIS7.5 it is showing only one image other 4 are not displaying, i have navigated the images in root site folder but it is still showing only one image other images are not, i am held up here please help me

VB.NET:
<asp:ScriptManager ID="ScriptManager1" runat="server">
 </asp:ScriptManager>
<asp:Timer ID="Timer1" runat="server" OnTick="gettickvalue" Interval="2000">
</asp:Timer>
<asp:UpdatePanel ID="BannerPanel" runat="server" UpdateMode="Conditional">
<Triggers >
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
<ContentTemplate>    
<asp:Image ID="imgBanner"  ImageAlign="Middle" ImageUrl="/images/pcb1.jpg" 
        runat="server" Width="500px" style="margin-right: 0px" Height="280px" /> 
</ContentTemplate>
</asp:UpdatePanel>
VB.NET:
Protected Sub gettickvalue(ByVal sender As Object, ByVal e As EventArgs)
        Dim RandomNumber As New Random()
        Dim n As Integer = RandomNumber.[Next](1, 5)
        imgBanner.ImageUrl = System.[String].Concat("/images/pcb", n.ToString(), ".jpg")
    End Sub
 

kulrom

Well-known member
Joined
May 10, 2005
Messages
2,854
Location
Republic of Macedonia
Programming Experience
10+
It seems that it shows up only the /images/pcb1.jpg right? AJAX extension seems to be your problem.

MS Ajax Extensions, necessary to run MS Ajax on the server has been made a part of .Net Framework 3.5, and every installation of .Net Framework 3.5 on the server automatically installs MS Ajax extensions as well. For .Net Framework 2, and 3, you need to install the MS Ajax extensions manually.

Download details: ASP.NET AJAX 1.0

Now just install it on the server.

Be sure that your server has or not installed FW 3.4 or above before you start implementing the above suggestion.
 
Top Bottom