加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 如何将HTML页面转换为.ASPX页面并向其添加/删除控件

发布时间:2020-12-16 06:26:02 所属栏目:asp.Net 来源:网络整理
导读:你好,我是ASP.NET的新手 我有一个来自另一个程序的设计html页面,我想使用可视化Web开发人员将html转换为asp.net aspx web表单. 我已正常打开页面,但在布局页面中移动或替换控件很困难,例如当我移动按钮时,页面的设计会崩溃. 如何在不改变页面布局的情况下将
你好,我是ASP.NET的新手

我有一个来自另一个程序的设计html页面,我想使用可视化Web开发人员将html转换为asp.net aspx web表单.

我已正常打开页面,但在布局页面中移动或替换控件很困难,例如当我移动按钮时,页面的设计会崩溃.
如何在不改变页面布局的情况下将按钮或文本框插入Visual Web Developer 2010中的aspx / html?

解决方法

要将html页面转换为aspx页面,

1. Create a new web form in visual web developer.
2. Copy the content from body of the html file,paste it in body of the aspx page.
3. Similarly copy the script,meta tags from head section of html,paste it in head    section of aspx page.
4.if any external style sheet,Images included with html file,add them appropriately in a folder of your asp.net application.
5.Now try to run the page and check if everything appears well,if not appearing well check the stylesheet and make some small changes.
6.Check at the top of the page asp.net,<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> it is necessary.

练习将为您提供完美的CSS,样式和HTML.

——————-一切都应该好————–

如果后面的代码中没有找到任何控件,请在标记中添加[runat =“server”]属性.并且是一个HTML控件,是服务器控件.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读