Imagebutton.ImageUrl won't let read

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

  1. doll

    doll

    Joined:
    Sep 15, 2008
    Messages:
    2
    Likes Received:
    0
    Code (Text):
        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. Advertisements

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. Dot net work
    Replies:
    4
    Views:
    675
    Dot net work
    Jun 16, 2004
  2. Luigi Donatello Asero

    Let or not let the text float

    Luigi Donatello Asero, Jan 15, 2004, in forum: HTML
    Replies:
    6
    Views:
    786
    Steve R.
    Jan 15, 2004
  3. Alan Silver
    Replies:
    1
    Views:
    3,221
    Alan Silver
    Jul 20, 2006
  4. Aaron
    Replies:
    11
    Views:
    16,138
    Aaron
    Sep 13, 2006
  5. DC
    Replies:
    2
    Views:
    1,256
  6. Gary K
    Replies:
    2
    Views:
    609
    Gary K
    Jan 8, 2008
  7. Pradeep

    ImageButton ImageURL question

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