小编AzN*_*joE的帖子

在GitHub页面中使用ASP.NET

我正在尝试使用Visual Studio 2013中的ASP.NET Web窗体模板在GitHub页面上创建一个个人网站.(我正在尝试学习ASP.NET/C#)

但看起来GitHub页面只会加载一个名为"index.html"的文件作为主页.

我将index.html文件重定向到我的Default.aspx文件,但它只是让我的浏览器下载该文件.这是我目前的index.html文件:

<html>
<head>
<title></title>
<meta http-equiv="refresh" content="1;url=/JoeWebsite/Default.aspx">
<meta name="keywords" content="automatic redirection">
</head>
<body>
If your browser doesn't automatically go there within a few seconds, 
you may want to go to 
<a href="/JoeWebsite/Default.aspx">My Website</a> 
manually.
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

ASP.NET项目在github中使用正确的repo.从上面的代码片段可以看出该项目的文件夹名为"JoeWebsite".

是否可以在GitHub中拥有一个ASP.NET网站?怎么样?

如果没有,是否有其他免费托管服务呢?

html c# asp.net git github-pages

10
推荐指数
1
解决办法
7527
查看次数

根据坐标获取当地时间

我正在编写一个应用程序,它应该根据您提供的坐标(纬度和经度)给出当地时间。

我只知道有两种方法可以做到这一点:

第一:获取时区名称,然后找到它的本地时间。第二:使用 Google API 并接收时间作为偏移量和 UTC 而不是本地。

我决定使用第一种方法,因为看起来更容易,所以我决定使用 GeoTimeZone 来获取时区...问题是我不知道如何获取该时区的本地时间...这里是我为获取 TimeZone 名称而编写的代码。

string tz = TimeZoneLookup.GetTimeZone(lat, lon).Result;
Run Code Online (Sandbox Code Playgroud)

变量lat&lon当然是坐标。

谢谢!

编辑:我的问题是如何在该时区获取 LocalTime?

c# datetime

7
推荐指数
2
解决办法
1万
查看次数

标签 统计

c# ×2

asp.net ×1

datetime ×1

git ×1

github-pages ×1

html ×1