Results 1 to 3 of 3

Thread: Chage an img dynamically

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2005
    Posts
    38

    Chage an img dynamically

    Hai,

    Iam working ASP.Net with C#.

    iam using web image server control.
    i want to change the image dynammically depending on the intermediate results from the written code while page is still in execution(execution not yet completed).

    For sample i have tried with the following code but i did not get it.
    i have tried in asp.net with vb.net
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'Put user code to initialize the page here
    Response.Buffer = True
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Response.Flush()
    Img.Src "file:///D:\IONETECH\Projects\computer1.png"
    Threading.Thread.Sleep(8000)
    Response.Flush()
    Img.Src = "file:///D:\IONETECH\Projects\logo.png"
    Threading.Thread.Sleep(8000)
    Response.Flush()
    Img.Src = "file:///D:\IONETECH\Projects\computer.png"
    Threading.Thread.Sleep(8000)
    Response.Flush()
    End Sub

    Plz. say the solution for the task.
    Thanks in advance.
    Rajeswari.

  2. #2
    Frenzied Member Phill64's Avatar
    Join Date
    Jul 2005
    Location
    Queensland, Australia
    Posts
    1,201

    Re: Chage an img dynamically

    ok, 1st, you should have posted this in ASP.NET forum, not in VB.NET

    2nd, put tags around your source code for easy viewing.

    It looks like what you want to do is animate an image... is that correct?
    if so, you cannot do this in ASP, as it's server side, you should include javascript to perform this action.

    look into cach'ing images and using timers in javascript.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Chage an img dynamically

    Quote Originally Posted by rajeswarri
    Iam working ASP.Net with C#.
    The VB.NET forum is the obvious place for this then.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width