简体   繁体   English

在visual studio中创建网站

[英]create website in visual studio

The question is can I create a website in Visual Studio 2012? 问题是我可以在Visual Studio 2012中创建一个网站吗? By which I mean like you can in Adobe Dreamweaver? 我的意思是你可以在Adobe Dreamweaver中使用它? I don't want to create an asp.net project, just a standard website with HTML, JS and JQuery. 我不想创建一个asp.net项目,只是一个带有HTML,JS和JQuery的标准网站。 I want to use VS because I like the intellisense, the ability to organise project files in the solution explorer and have everything easily accessible. 我想使用VS,因为我喜欢intellisense,能够在解决方案资源管理器中组织项目文件,并且可以轻松访问所有内容。 At the moment I am just loading the index.html or stylesheet.css in to edit them but I would like if it i could browse through it as if it was a project. 目前我只是加载index.html或stylesheet.css来编辑它们,但我想如果它我可以浏览它就好像它是一个项目。

I know Dreamweaver can do this, the reason why I am asking is because I don't have any licences for Dreamweaver so it would be more practical if I could do it in VS. 我知道Dreamweaver可以做到这一点,我问的原因是因为我没有Dreamweaver的任何许可证所以如果我能在VS中做到这一点会更实用。

If you have a folder with all your HTML and CSS files and so on in it, you can open it by File > Open > Website. 如果您有一个包含所有HTML和CSS文件的文件夹,依此类推,您可以通过文件>打开>网站打开它。 You can browse to your desired folder or ftp server. 您可以浏览到所需的文件夹或ftp服务器。 When you opened your desired folder you have everything in your solution explorer. 当您打开所需的文件夹时,解决方案资源管理器中包含所有内容。 To make a .sln file of this now just browse to File > Save YourFolderName.sln As... Is this what you were looking for? 要创建一个.sln文件,现在只需浏览File> Save YourFolderName.sln As ...这就是你要找的东西吗?

Yes, you can create static HTML web sites in Visual Studio, however I don't know that a project template exists for this. 是的,您可以在Visual Studio中创建静态HTML网站,但我不知道存在项目模板。

That being said, you could just create an empty ASP.NET application, but use HTML/CSS/JavaScript, without using any ASPX pages, or code. 话虽这么说,你可以创建一个空的ASP.NET应用程序,但使用HTML / CSS / JavaScript,而不使用任何ASPX页面或代码。 I've successfully achieved this for several static webpages / HTML tests etc. 我已成功实现了几个静态网页/ HTML测试等。

TypeScript also provides a similar template for static HTML based web sites, however, I believe that this template is also based on an empty ASP.NET application, but modified for TypeScript development (it inclused an app.ts file, which you can delete if it's not necessary). TypeScript还为基于静态HTML的网站提供了类似的模板,但是,我相信这个模板也基于一个空的ASP.NET应用程序,但是针对TypeScript开发进行了修改(它包含了一个app.ts文件,你可以删除它这不是必需的)。

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

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