将aspx页面转换为html页面 [英] conversion of aspx page to html page

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

问题描述

海大家,

我是一名自由职业者,我现在正在做一家公司的网站。我在微软Visual Studio 2010上做这个网站,当我查看网站文件夹时,它是所有的aspx格式只在visual studio中打开。我必须向这个没有视觉工作室的客户展示这个网站。任何人都可以告诉我如何在不使用visual studio或如何向客户展示我的网站的任何想法将其转换为html页面。

解决方案

在浏览器中打开页面,右键单击并选择查看页面源,将页面保存为html,就这么简单。但是你不会得到任何代码。


用你的记事本打开那个aspx页面

你可能会得到一些代码



假设你得到了



 <%@  < span class =code-attribute>   Page    语言  =  C#     AutoEventWireup   = < span class =code-keyword> true    CodeFile   =  index.aspx.cs    Inherits   =  user_index   %>  

< !DOCTYPE html PUBLIC - // W3C // DTD XHTML < span class =code-attribute> 1.0 Transitional // EN http://www.w3.org/TR/xhtml1/ DTD / xhtml1-transitional.dtd >

< html xmlns = http://www.w3.org/1999/xhtml >
< head runat = server >
< title > Untitled Page < / title >
< / head >
< 正文 >
< 表格 id = form1 runat = 服务器 >
< div >
Hello World
< / div >
< / form >
< / body >
< / html < span class =code-keyword>>





删除标签



 <  ![CDATA [<%@       语言 <温泉n class =code-keyword> =  C#    AutoEventWireup   =  true    CodeFile   =  index.aspx .cs   继承  =  user_index    > ]]> 





然后使用.html扩展名保存txt文件。

在这里你可以看到设计,但是你看不到asp.net的服务器控件。


Hai everybody,
I am a freelancer and i am right now doing a website of a company.I am doing this website in microsoft visual studio 2010 and when i looked in website folder, it is all in aspx format which opens only in visual studio.I have to show this website to this client who does''nt have a visual studio.Can anyone tell me any idea of how to show my website to client without using visual studio or how to convert it to html pages.

解决方案

Open page in browser,right click and select view page source,save page as html,its that easy.But you will not get any code behind.


open that aspx page with your notepad
you might be getting some code

suppose you are getting

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="user_index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
Hello World
    </div>
    </form>
</body>
</html>



Remove the tag

<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="user_index" %>]]>



then save txt file with .html extension.
In this you will be able to see the design , but you can''t see the server controls of asp.net.


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

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