基本网站获得错误CS1002 :;预期

时间:2017-02-28 02:52:02

标签: javascript html asp.net

我尝试使用带有Bootstrap和HTML的Visual Studio 2015创建网站,但到目前为止,我所运行的代码并没有收到错误消息。

enter image description here]

我们也按照本网站上的说明进行操作:HTMLGoodies.com

这是我到目前为止的代码:

<html xmlns="http://www.w3.org/1999/xhtml">

  <head runat="server">
    <title>Time Entry</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="stylesheet" href="bootstrap.min.css" />
    <script src="bootstrap.min.js"></script>
    <link rel="stylesheet" href="bootstrap-theme.min.css" />
  </head>

  <body>
    <form id="form1" runat="server">
      <div class="container-fluid">
        <h1>Logo Book</h1>
        <p>Discover Artists and Shape Your Perfect Logo</p>
      </div>
      <div class="row">
        <div class="col-md-4" style="background-color:blue;">
          Welcome to Logo Book where you can browse through potyfolios of your prefered artist and see what they have to offer.
        </div>
        <div class="col-md-4" style="background-color:palegoldenrod;">
          Looking for an easier way to get in touch with these artists and give specific details needed for your project?
        </div>
        <div class="col-md-4" style="background-color:coral;">
          Feel free to use our Q&A section to voice and submit your needs such as fonts and images!
        </div>

      </div>
    </form>
  </body>

</html>

2 个答案:

答案 0 :(得分:0)

我在计算机上运行了这个确切的代码,运行得很好。你是如何尝试运行此代码的?测试代码是否有效的最简单方法是在.html文件中键入它,然后用浏览器打开它。

答案 1 :(得分:0)

代码也适用于.aspx页面。在创建新的Web应用程序时,Global.asax页面不包含行号2,3和4.要运行该页面,只需删除它们并运行它。它肯定会运行。如果你想使用第2行,那么请详细描述你写这行的目的。所以我们可以根据它找到解决方案。