简体   繁体   English

基本网站出现错误CS1002: 预期

[英]Basic website gets error CS1002: ; expected

I'm trying to create a website using Visual Studio 2015 with Bootstrap and HTML but so far, the code I have doesn't run and I get an error message. 我正在尝试使用带有Bootstrap和HTML的Visual Studio 2015创建一个网站,但是到目前为止,我运行的代码无法运行,并且出现错误消息。

在此处输入图片说明 ] ]

Iv'e also been following the instructions on this site: HTMLGoodies.com Iv'e也遵循此网站上的说明: HTMLGoodies.com

Here is the code I have so far: 这是我到目前为止的代码:

<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>

I ran this exact code on my computer, and it ran just fine. 我在计算机上运行了这个确切的代码,并且运行得很好。 How are you trying to run this code? 您如何尝试运行此代码? The easiest way to test if the code works is to type it in .html file, and open it with your browser. 测试代码是否可行的最简单方法是在.html文件中键入代码,然后使用浏览器将其打开。

The code works fine in .aspx page also. 该代码在.aspx页面中也可以正常工作。 On creating new web application, Global.asax page doesn't contains line numbers 2,3 and 4. To run the page just remove them and run it. 创建新的Web应用程序时,Global.asax页面不包含行号2,3和4。要运行该页面,只需将其删除并运行即可。 It will definately run. 它一定会运行。 If you want to use that line no 2 then please describe your purpose for writing that line in detail. 如果要使用第二行,请详细描述您写该行的目的。 So we can find the solution according to it. 因此我们可以根据它找到解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM