6

您好,我是 ASP.NET 的新手

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

我已经正常打开了页面,但是布局页面中的控件很难移动或替换,例如当我移动一个按钮时,页面的设计就会崩溃。如何在 Visual web Developer 2010 上将按钮或文本框插入到 aspx/html 中而不更改页面布局?

4

1 回答 1

6

要将 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控件并且是服务器控件。


于 2013-01-22T06:27:34.613 回答