Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8759385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:47:24+00:00 2026-06-13T14:47:24+00:00

Here I’am checking if WebBrowserEx1.Document.All.Item(t).OuterHtml is equal to abc but despite that they are

  • 0

A weird case in if clause in Visual Basic

Here I’am checking if
WebBrowserEx1.Document.All.Item(t).OuterHtml is equal to abc but despite that they are same, it doesnt accept them same and does not perform the code in if statement. The blind one is me or Visual Basic ?

Big Pic : https://i.stack.imgur.com/hVjpH.png

Edit:

For t = 1 To WebBrowserEx1.Document.All.Count
    Dim abc = "<LI style=""PADDING-BOTTOM: 2px; PADDING-TOP: 2px"">Hata oluştu. İşlem tamamlanamamıştır. "
    If WebBrowserEx1.Document.All.Item(t).OuterHtml = abc Then
                        WebBrowserEx1.Navigate("http://uyg.sgk.gov.tr/vizite/tarihGiris.do")
       loc = "giris"
       WebBrowserEx1.Update()
       yeniSayfa = True

       Exit For
     End If
Next

Value of WebBrowserEx1.Document.All.Item(t).OuterHtml in watch:
“Hata oluştu. İşlem tamamlanamamıştır. “

The Value of abc in watch:
“Hata oluştu. İşlem tamamlanamamıştır. “

I think big pic should be more explanatory.

Second try with type correction

For t = 1 To WebBrowserEx1.Document.All.Count
                    Dim abc As String
                    abc = "<LI style=""PADDING-BOTTOM: 2px; PADDING-TOP: 2px"">Hata oluştu. İşlem tamamlanamamıştır. "
                    If WebBrowserEx1.Document.All.Item(t).OuterHtml = abc Then
                        WebBrowserEx1.Navigate("http://uyg.sgk.gov.tr/vizite/tarihGiris.do")
                        loc = "giris"
                        WebBrowserEx1.Update()
                        yeniSayfa = True
                        Exit For
                    End If
                Next
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:47:25+00:00Added an answer on June 13, 2026 at 2:47 pm

    Note the type of each object in the right column. Since abc variable is of type “Object”, the = operator is checking for reference equality. The object referred to by abc may be a string, but since the variable is merely typed as an Object, you get the reference comparison. Since those two objects do not refer to the same block of memory, the compare returns False. Change your abc declaration to look like this:

    Dim abc As String = "<LI ... "
    

    Some other things to look for:

    • Any whitespace difference won’t show up in the debug/watch windows, which can mangle the displayed value of your variables to fit in the space. Try clicking on the magnifying glass for a closer look.
    • I see some non-ascii characters. Make sure you’re using the exact same unicode code points, or the comparison can fail.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is an object that I'd like to use with ng-repeat, but it's not
Here's some sample HTML <style> .icon {display:none;} </style> <ul> <li>ABC <i id=abc class=icon>x</i></li> <li>DEF
Here's what I'm trying to accomplish with this program: a recursive method that checks
Here is the problem that I am trying to solve. I have two folders
Here's what my table TheTable looks like ColA | ColB | ColC ------+-------+------ abc
Here is my program to find all the subsets of given set. To solve
Here is my scenario. I have a website running under AppPool1 and that works
Here are the tables I have: Table A which has entries with item and
Here's the code I have. It works. The only problem is that the first
Here's a basic regex technique that I've never managed to remember. Let's say I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.