Click here to Skip to main content
15,909,591 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionGridview asp.net 2005 Pin
5fingers26-Oct-09 18:40
5fingers26-Oct-09 18:40 
AnswerRe: Gridview asp.net 2005 Pin
Vimalsoft(Pty) Ltd26-Oct-09 20:29
professionalVimalsoft(Pty) Ltd26-Oct-09 20:29 
Question[Message Deleted] Pin
Purish Dwivedi26-Oct-09 18:24
Purish Dwivedi26-Oct-09 18:24 
AnswerRe: how to maintain session with AccessDataSourceControl in asp.net with C# Pin
Rajmendra*Nh26-Oct-09 19:26
Rajmendra*Nh26-Oct-09 19:26 
QuestionRe: how to maintain session with AccessDataSourceControl in asp.net with C# [modified] Pin
Purish Dwivedi26-Oct-09 20:04
Purish Dwivedi26-Oct-09 20:04 
QuestionWeb deployment project not replacing existing files after 3.5 upgrade Pin
Jordan Marr26-Oct-09 14:12
Jordan Marr26-Oct-09 14:12 
AnswerRe: Web deployment project not replacing existing files after 3.5 upgrade Pin
Oakman26-Oct-09 15:47
Oakman26-Oct-09 15:47 
QuestionDisplaying Image in ASP.NET AJEX Pin
bapu288926-Oct-09 10:03
bapu288926-Oct-09 10:03 
Hello all

I am working on my one of my assignment to create ASP.NET AJAX project it's simple with one default.aspx page and on the middle of page there is one updatepanel and inside UpdatePanel there is on ImageBox and one Timer

I have one Image folder and there are 16 images and i want to display image in to imagebox in order from 1 to 16 and after 16th image it goes to image 1 and so on this is what i have done so far and it's working ok but still i want to do some thing in it

Dim MyImage(15) As String
Private Sub GetImages()
    MyImage(0) = "1.png"
    MyImage(1) = "2.png"
    MyImage(2) = "3.png"
    MyImage(3) = "4.png"
    MyImage(4) = "5.png"
    MyImage(5) = "6.png"
    MyImage(6) = "7.png"
    MyImage(7) = "8.png"
    MyImage(8) = "9.png"
    MyImage(9) = "10.png"
    MyImage(10) = "11.png"
    MyImage(11) = "12.png"
    MyImage(12) = "13.png"
    MyImage(13) = "14.png"
    MyImage(14) = "15.png"
    MyImage(15) = "16.png"
End Sub

Sub GetNextImage(ByVal Src As Object, ByVal Args As EventArgs)
    'Retrieve the array from view state
    MyImage = ViewState("PictureArray")

    'Increment the image counter
    ViewState("Counter") += 1
    If ViewState("Counter") > 15 Then
        ViewState("Counter") = 0
    End If

    'Assign the next image to the control
    BannerImage.ImageUrl = MyImage(ViewState("Counter"))
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    If Not Page.IsPostBack Then
        '--Load as array with image ursl and save to view state
        Call GetImages()
        ViewState("PictureArray") = MyImage

        '--Establish a counter to keep track of the array index
        ViewState("Counter") = 0
        BannerImage.ImageUrl = MyImage(ViewState("Counter"))
    End If
End Sub

and HTML is like

<asp:UpdatePanel ID="BannerUpdatePanel" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer2" />
</Triggers>
<ContentTemplate>
<asp:Timer ID="Timer2" runat="server" Interval="250" OnTick="GetNextImage">
</asp:Timer>
<br />
<asp:Image ID="BannerImage" runat="server"
ImageUrl="~/Globe/1.png" />&nbsp;
</ContentTemplate>
</asp:UpdatePanel>


Now it's working ok but Imabebox flash too much and in the bottom left corner of web page it's keep showing downloading image url so how can i solve it and also it only flash when it change to next image and last is this the right way to do this or is there better way to do it.

Thank you
AnswerRe: Displaying Image in ASP.NET AJEX [modified] Pin
Not Active26-Oct-09 10:14
mentorNot Active26-Oct-09 10:14 
QuestionRe: Displaying Image in ASP.NET AJEX Pin
bapu288926-Oct-09 10:51
bapu288926-Oct-09 10:51 
AnswerRe: Displaying Image in ASP.NET AJEX Pin
Christian Graus26-Oct-09 10:58
protectorChristian Graus26-Oct-09 10:58 
AnswerRe: Displaying Image in ASP.NET AJEX Pin
Abhishek Sur26-Oct-09 12:01
professionalAbhishek Sur26-Oct-09 12:01 
QuestionRe: Displaying Image in ASP.NET AJEX Pin
bapu288926-Oct-09 12:31
bapu288926-Oct-09 12:31 
AnswerRe: Displaying Image in ASP.NET AJEX Pin
Not Active26-Oct-09 12:37
mentorNot Active26-Oct-09 12:37 
AnswerRe: Displaying Image in ASP.NET AJEX Pin
Christian Graus26-Oct-09 12:39
protectorChristian Graus26-Oct-09 12:39 
GeneralRe: Displaying Image in ASP.NET AJEX Pin
Not Active26-Oct-09 12:47
mentorNot Active26-Oct-09 12:47 
GeneralRe: Displaying Image in ASP.NET AJEX Pin
Not Active26-Oct-09 12:33
mentorNot Active26-Oct-09 12:33 
GeneralRe: Displaying Image in ASP.NET AJEX Pin
5fingers26-Oct-09 18:52
5fingers26-Oct-09 18:52 
GeneralRe: Displaying Image in ASP.NET AJEX Pin
Abhishek Sur26-Oct-09 22:19
professionalAbhishek Sur26-Oct-09 22:19 
GeneralRe: Displaying Image in ASP.NET AJEX Pin
Not Active27-Oct-09 1:58
mentorNot Active27-Oct-09 1:58 
GeneralRe: Displaying Image in ASP.NET AJEX Pin
Abhishek Sur27-Oct-09 7:41
professionalAbhishek Sur27-Oct-09 7:41 
QuestionSql query bulider? Pin
Jollyguy26-Oct-09 5:37
Jollyguy26-Oct-09 5:37 
AnswerRe: Sql query bulider? Pin
Not Active26-Oct-09 5:49
mentorNot Active26-Oct-09 5:49 
QuestionNeed to Bind the GridView for Dynamically Loaded User control In Default Page. Pin
Johndas26-Oct-09 4:41
Johndas26-Oct-09 4:41 
AnswerRe: Need to Bind the GridView for Dynamically Loaded User control In Default Page. Pin
Not Active26-Oct-09 5:06
mentorNot Active26-Oct-09 5:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.