在asp.net中使用现有的html布局
这是我第一次尝试制作登录页面。我想要做的就是获取现有的 html 并将登录控件放在该页面上。我意识到我不能获取 html 并将 asp 控件放到它上面。我的问题是如何使用现有的 HTML 布局作为新的 aspx 页面的模板?
This is my first time trying to make a login page. What I want to be able to do is take an existing html and put the login control on that page. I realize I can't take the html and drop asp controls on to it. My question is how do I use the existing HTML layout as the template for my new aspx page?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
1) 获取现有页面的源(在浏览器中查看 -> 右键单击 -> 查看源 -> 全选 -> 复制)
2)新建一个aspx页面;删除<%@ Page %>之后的所有内容指示
3) 从 HTML 页面粘贴 HTML 源代码。
4)切换到aspx页面的设计视图,删除不需要的内容,添加登录控件。
1) Get the source for the existing page ( View in a browser -> Right Click-> View source -> Select All -> Copy)
2) Create a new aspx page; delete everything after the <%@ Page %> directive
3) Paste your HTML source from the HTML page.
4) Switch to design view of the aspx page, and delete whatever you dont need, add your login controls.
创建一个空的 asp.net 项目,然后将 HTML 复制到新页面中,并对其进行修改以与您放入其中的控件一起使用。
Create an empty asp.net project and then copy the HTML into the new page and modify it to work with the controls you are dropping into it.
如果您想在多个页面上保留布局,并且我不确定这就是您想要的,那么最好的办法是将布局的 html 存储在母版页中。
If you want to persist a layout across multiple pages and I'm not sure that's what you are looking for, then the best thing to do is to store the html for layout in a master page.