你好,我是ASP.NET的新手
我有另一个程序设计的html页面,我想使用可视化Web开发人员将html转换为asp.net aspx Web表单。
我已正常打开页面,但在布局页面中移动或替换控件很困难,例如当我移动按钮时,页面设计会崩溃。 如何在不改变页面布局的情况下在Visual Web Developer 2010上将按钮或文本框插入到aspx / html中?
答案 0 :(得分:5)
要将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控件,是服务器控件。