RPM1984
RPM1984

Reputation: 73123

How Do I Stop Visual Studio 2010 Editor From Making Code Hyperlinks?

Its quite annoying.

Example:

private const string someUrl = "http://foo.com";

I don't want the text to be turned into a hyperlink in the code editor.

Any ideas how to turn this off?

Upvotes: 46

Views: 8108

Answers (3)

user8298366
user8298366

Reputation:

I realize this is a somewhat dated question but when looking for a solution to programmatically update the date in a URL I was sending requests to, which VS2019 turning the string into a hyperlink was breaking, I just concatenated the "https://" with the rest of the URL and was able to use the $@"string" to achieve what I wanted to do. No need to toggle options or add extensions.

HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://" + 
$@"url.com/startDate={DateTime.Now.ToString("yyyy-MM-dd")}");

Upvotes: 1

paxdiablo
paxdiablo

Reputation: 882068

Not sure about VS2010 but, in VS2008, you can open up Tools, Options, Text Editor, <Your Language>, General, there's a Enable single-click URL navigation checkbox that you should de-select.

With any luck, Microsoft won't have moved it too far from there in VS2010 :-)

Upvotes: 6

SLaks
SLaks

Reputation: 887797

Tools, Options, Text Editor, C# (or any other language), Enable single-click URL navigation.

Upvotes: 85

Related Questions