Toggling Image

Discussion in 'ASP .Net' started by =?Utf-8?B?c2lhag==?=, May 4, 2005.

  1. Hello all,,

    I want to have a page where I can have two images shown alternately in a
    image control.

    The image should keep toggling

    Any link or sample code will be appreciated.



    Cheers,

    siaj
    =?Utf-8?B?c2lhag==?=, May 4, 2005
    #1
    1. Advertising

  2. try this:

    private void Toggle()
    {
    if ( imgToggle.ImageUrl == "Images/open.gif" )
    {
    imgToggle.ImageUrl = "Images/close.gif";
    }
    else
    {
    imgToggle.ImageUrl = "Images/open.gif";
    }
    }

    "siaj" wrote:

    > Hello all,,
    >
    > I want to have a page where I can have two images shown alternately in a
    > image control.
    >
    > The image should keep toggling
    >
    > Any link or sample code will be appreciated.
    >
    >
    >
    > Cheers,
    >
    > siaj
    >
    =?Utf-8?B?U2hhbmU=?=, May 6, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    387
    jasonkester
    Jul 7, 2005
  2. Replies:
    0
    Views:
    366
  3. Jamie

    Toggling display problems

    Jamie, Jan 28, 2004, in forum: HTML
    Replies:
    7
    Views:
    447
    Nik Coughin
    Jan 29, 2004
  4. kal
    Replies:
    0
    Views:
    305
  5. Debajit Adhikary
    Replies:
    10
    Views:
    509
    Luis Zarrabeitia
    Oct 18, 2007
Loading...

Share This Page