如何转换硬codeD HTML网站对ASP mvc4? [英] how to convert hardcoded html site to asp mvc4?

查看:91
本文介绍了如何转换硬codeD HTML网站对ASP mvc4?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有5页硬codeD HTML网站,并希望将其转换为mvc4。

I have a hard coded html website of 5 pages and want to convert it to mvc4.

我需要做什么?
有一步引导教程或步骤概述如何使html的动态文件通过MVC?

what do i need to do? Is there a tutorial or step by step guide outlining how to make .html files dynamic via MVC?

推荐答案

您会想你改变过来之前得到MVC的一个基本的了解,尤其是路由 - 你会避免很多混乱和陷阱中未来。

You are going to want to get a basic understanding of MVC and especially the routing before you change it over - you will avoid a lot of confusion and pitfalls in the future.

基本上,所有你需要做的是为您的HTML控制器(假人,现在),和HTML复制到相应的视图。这将当你明白在Global.asax文件中的路由是行得通的。然后,我会更新的链接 @ Html.ActionLink 语法,并从那里转移 - 接下来可能提取 _layout 通用设计等。

Basically, all you will need to do is create Controllers (dummy, for now) for your html, and copy the html into the respective View. This will all make sense when you understand the routing in the global.asax file. Then I would update the links to @Html.ActionLink syntax and move from there - likely next extracting a _Layout for universal design, etc.

基本上,读取最小的快速教程,或者你只会阻碍自己。

Basically, read a quick tutorial at minimum, or you will just frustrate yourself.

这篇关于如何转换硬codeD HTML网站对ASP mvc4?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆