Imagebutton.ImageUrl won't let read

Discussion in '.NET' started by doll, Sep 15, 2008.

  1. doll

    doll

    Joined:
    Sep 15, 2008
    Messages:
    2
    Code:
        private void changeImageUrl()
        {
            string an= Request.QueryString["an"];
    
            if (an == "Middag")
            {
                if (imgBtnMelk.ImageUrl == "~/Images/bw_middag.jpg")
                {
                    lblTest.Text = "Boo!"; // why won't it be read?
                }
            }
    I've tested the label everywhere and figured out the wrong code must be:
    if (imgBtnMelk.ImageUrl == "~/Images/bw_middag.jpg")

    Does anyone have another suggestion for it?

    (If i let lblTest.Text show imgBtnMelk.ImageUrl, it will show ~/Images/bw_middag.jpg.)
     
    doll, Sep 15, 2008
    #1
    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. Luigi Donatello Asero

    Let or not let the text float

    Luigi Donatello Asero, Jan 15, 2004, in forum: HTML
    Replies:
    6
    Views:
    478
    Steve R.
    Jan 15, 2004
  2. DC
    Replies:
    2
    Views:
    1,012
  3. Gary K
    Replies:
    2
    Views:
    462
    Gary K
    Jan 8, 2008
  4. Pradeep

    ImageButton ImageURL question

    Pradeep, Jan 27, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    216
    Pradeep
    Jan 27, 2005
  5. dphizler@gmail.com
    Replies:
    0
    Views:
    641
    dphizler@gmail.com
    Nov 1, 2012
Loading...

Share This Page