thiago costa

thiago costa

  • NA
  • 340
  • 0

::ERROR:: Error1Operator '!=' cannot be applied to operands of type 'method group' and 'string'

Oct 31 2011 10:49 PM
Error1Operator '!=' cannot be applied to operands of type 'method group' and 'string'



Error2Cannot assign to 'ToString' because it is a 'method group'


  if (Webbrowser1.Url.ToString != TB_C_S.Text)
            {
                Webbrowser1.Navigate(TB_C_S.Text);
            }


            else
            {
            }


All I am trying to do is:

IF, the webbrowser1's URL is NOT EQUAL to TB_C_S.Text, don't do anything...


Or else, 

Do something...


TB_C_S is the name of the textbox that will contain the URL..

Thanks guys







EDIT



I tryed this too:  (WB_X is name or webbrowser)  TB_C_S is name of textbox.


 string url1;
            url1 = Convert.ToString(WB_X.Url);
           
            if (url1 == TB_C_S.Text)
            {


               
            }
            else
            {
                WB_X.Navigate(TB_C_S.Text);
            }

still getting error

Answers (1)