locked
Image.Tag error

    Question

  • hi

    why when do this code said error :

                   

     if (image51.Tag.ToString()=="100")
                {

                }

    i set image51.Tag=100 in load page

    Tanx


    Amir Ameri


    • Edited by AMIR ameri Saturday, February 14, 2015 8:45 PM
    Saturday, February 14, 2015 8:45 PM

Answers

  • Either image51 is not set out it doesn't have a tag. Probably the latter, but the debugger will tell you for sure.

    It depends on the app if the bug is that it isn't set or that the app crashes if it isn't set or both.

    i set image51.Tag=100 in load page

    From the results it sounds like this isn't happening as you think it is. You might want to check the code flow in the debugger to see that it's getting set and not unset.


    Sunday, February 15, 2015 1:50 AM
    Owner