将.aspx文件转换为html文件 [英] convert a .aspx file to html files

查看:250
本文介绍了将.aspx文件转换为html文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将.aspx文件转换为html文件

解决方案

在浏览器中在本地计算机上打开它,查看源代码(在IE中查看|来源,在Firefox等中查看|页面源代码,然后将该页面源保存为pagename.html。



显然你将丢失任何asp.net页面方法


如果我理解你的话,这不是一个好主意。

HTML文件是静态的 - 允许的唯一处理是在客户端机器上,通过javascript。



ASPX文件是动态的,每次用户加载或交互页面时都会在服务器上进行处理,这会生成传递给客户端浏览器的HTML。



如果将ASPX转换为HTML,则会丢失页面的所有动态元素。试一试:在浏览器中加载ASPX页面并右键单击。选择查看页面源(或浏览器调用的任何内容)并将其保存到本地硬盘驱动器。您可以加载它,它看起来就像您的页面,但实际上什么都不会。


请参阅:



http:// answers。 yahoo.com/question/index?qid=20101223220902AAFPGy3 [ ^ ]

how to convert a .aspx file to html files

解决方案

Open it on your local machine in a browser, view the source (View | Source in IE, View | Page Source in Firefox etc ), then save that page source as pagename.html.

Obviously you will lose any asp.net page methods


That is not a good idea, if I understand you right.
HTML files are static - the only processing allowed is on the client machine, via javascript.

ASPX files are dynamic, there is processing on the server each time the page is loaded or interacted with by the user, and this generates HTML which is passed to the client browser.

If you convert your ASPX to HTML you will lose all the dynamic elements of the page. Try it: Load your ASPX page in the browser and right click. Select "View Page Source (or whatever your browser calls it) and save that to you local HDD. You can load it, and it will look like your page, but nothing will actually work.


Refer this:

http://answers.yahoo.com/question/index?qid=20101223220902AAFPGy3[^]


这篇关于将.aspx文件转换为html文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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