[英]How to convert an HTML page to .ASPX page and add/Remove Controls to it without changing the layout of the page
你好,我是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控件,是服务器控件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.