external hyper link 在 IIS express 中不起作用。我如何让 hyper links 连接到互联网?
external hyper link does not work in IIS express. How do I get hyper links to reach internet?
好的,所以当您在我的网络应用程序中单击超级 link 时,它只会添加到 URL 到最后。像这样 http://localhost:8080/http//:www.youtube.com. I'm using visual studio .net to make web rest APIs. The web app lunches on IIS express 10. the home page URL is http://localhost:8080/index.html.
用户获得 link 次点击
links are populated
用户点击后出错 link
error page
$.ajax(
{
url: "/api/Link/1",
type: "GET",
dataType: "json",
success: function (data)
{
var array = $.parseJSON(data);
$("a").remove();
for(var i=0;i<array.length;i++)
{
$("body").append("<a href=\"" + array[i].linkVal+ "\">" + array[i].name + "</a>");
}
},
error: function ()
{
}
});
//rest api called
[HttpGet]
public string GetLinkList(int id)
{
string json = "[";
using (StreamReader infile = new StreamReader("C: /Users/jkarp/Documents/visual studio 2015/Projects/Protal/Protal/App_Data/linkObjs.txt"))
{
while (!infile.EndOfStream)
json += infile.ReadLine()+",";
}
if(json.Length > 1)
{
json = json.Remove(json.Length - 1);
return json + "]";
}
return "[]";
}
您的 link 格式不正确:
http//:www.youtube.com
冒号:
写错了,应该是:
link 将包含在您的数据源 linkObjs.txt
中,在那里修复它,问题就会消失。
好的,所以当您在我的网络应用程序中单击超级 link 时,它只会添加到 URL 到最后。像这样 http://localhost:8080/http//:www.youtube.com. I'm using visual studio .net to make web rest APIs. The web app lunches on IIS express 10. the home page URL is http://localhost:8080/index.html.
用户获得 link 次点击 links are populated 用户点击后出错 link error page
$.ajax(
{
url: "/api/Link/1",
type: "GET",
dataType: "json",
success: function (data)
{
var array = $.parseJSON(data);
$("a").remove();
for(var i=0;i<array.length;i++)
{
$("body").append("<a href=\"" + array[i].linkVal+ "\">" + array[i].name + "</a>");
}
},
error: function ()
{
}
});
//rest api called
[HttpGet]
public string GetLinkList(int id)
{
string json = "[";
using (StreamReader infile = new StreamReader("C: /Users/jkarp/Documents/visual studio 2015/Projects/Protal/Protal/App_Data/linkObjs.txt"))
{
while (!infile.EndOfStream)
json += infile.ReadLine()+",";
}
if(json.Length > 1)
{
json = json.Remove(json.Length - 1);
return json + "]";
}
return "[]";
}
您的 link 格式不正确:
http//:www.youtube.com
冒号:
写错了,应该是:
link 将包含在您的数据源 linkObjs.txt
中,在那里修复它,问题就会消失。