Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在新窗口或选项卡c中打开超链接?_C#_Html - Fatal编程技术网

C# 在新窗口或选项卡c中打开超链接?

C# 在新窗口或选项卡c中打开超链接?,c#,html,C#,Html,下面是C字符串生成器代码,当前当用户单击超链接时,它会在后台打开,我需要在新选项卡中打开它,或者单击超链接后在窗口中打开它。请告知 sb.Append("<td><a href=\"" + baseMMPUrlConfigValue + "/profile/supplier/" + organisation.Id + "\">Profile Link</a></td>"); 将代码中的上一行替换为下一行,这将为您带来奇迹 sb.Append("&

下面是C字符串生成器代码,当前当用户单击超链接时,它会在后台打开,我需要在新选项卡中打开它,或者单击超链接后在窗口中打开它。请告知

sb.Append("<td><a href=\"" + baseMMPUrlConfigValue + "/profile/supplier/" + organisation.Id + "\">Profile Link</a></td>");

将代码中的上一行替换为下一行,这将为您带来奇迹

sb.Append("<td><a target=\"_blank\" href=\"" + baseMMPUrlConfigValue + "/profile/supplier/" + organisation.Id + "\">Profile Link</a></td>");

@camiloterevino的可能副本请根据副本编辑代码,target=\u blank是您的朋友。此属性将导致链接根据用户的设置在新选项卡或窗口中打开,这是您无法控制的。很惊讶你在网上找不到这样的东西?某人追加;是的,看起来不错