dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Green underline in code

  1. #1
    Join Date
    Sep 2014
    Posts
    48

    Green underline in code

    Hello

    In my VS 2017 code which says 'thank you' to a user for sending a form, I am getting a green underline under the word 'target':

    Code:
    Dim target = String.Format("~/thankyou.aspx?user_name={0}", user_name)
    Should I be typing something like 'Dim target as String'? The end result, which would appear in my 'thankyou.aspx' page should be something like 'Thank you, John'.

    Thank you for any advice.

    Steve

  2. #2
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,006

    Re: Green underline in code

    Is the word 'target' a reserved key word in VB? Have you tried using a different variable name?

  3. #3
    Join Date
    Sep 2014
    Posts
    48

    Re: Green underline in code

    I have just checked here, Arjay, https://docs.microsoft.com/en-us/dot...ence/keywords/ and no, 'target' is not reserved.

    Thanks for replying.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,405

    Re: Green underline in code

    Quote Originally Posted by SteveHi View Post
    I have just checked here, Arjay, https://docs.microsoft.com/en-us/dot...ence/keywords/ and no, 'target' is not reserved.

    Thanks for replying.
    And what happened if you would use a different name, like target1?
    Victor Nijegorodov

  5. #5
    Join Date
    Sep 2014
    Posts
    48

    Re: Green underline in code

    That's now working, Victor. Thank you!

  6. #6
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,405

    Re: Green underline in code

    Quote Originally Posted by SteveHi View Post
    That's now working, Victor. Thank you!
    You are welcome! And thanks Arjay for his hint!
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)