问题描述
我正在寻找一个备忘单,它可以让我向 HTML 设计人员展示标准 HTML 标记的等效 asp.net 控件.例如,<asp:Panel> 将呈现为 HTML <div>,而 <asp:Label> 将呈现为 HTML <span>.我一直在谷歌搜索无济于事.有人可以发布一个好的备忘单的链接,以便该项目的设计人员可以更清楚地理解 aspx 页面上的标记.
I'm looking for a cheat sheet that will allow me to show an HTML designer the equivalent asp.net controls for standard HTML tags. As an example the <asp:Panel> will render as an HTML <div> and an <asp:Label> will render as an HTML <span>. I've been googling this to no avail. Can someone post a link to a good cheat sheet so that the designers on this project can understand the markup on the aspx pages more clearly.
为了清楚起见,我想要一个指向主要 ASP.NET 控件列表的链接,并说明它们与标准 HTML 的关系.如果这是 PDF 格式或易于阅读和打印的网页,那就太好了.就我而言,原因是我们有一个非常熟悉 HTML 的 PHP 开发人员来处理我们的项目,我觉得如果可以的话,更好地理解标准 ASP.NET 服务器控件会很有用递给他这样的备忘单".
To be clear, I would like a link to a list of major ASP.NET controls, with descriptions as to how they would relate to standard HTML. It would be great if this were in PDF format or on an easy to read and print web page. The reason, in my case, would be that we have a PHP developer who is very familiar with HTML coming to work on our project, and I feel it would be useful to have a better understanding of standard ASP.NET server controls if I could hand him such a "cheat sheet".
我主要指的是 .NET 2.0 框架,但我们也在使用 3.0/3.5.
I'm referring mainly to the .NET 2.0 framework, but we are also doing work with 3.0/3.5.
推荐答案
这不是一个简单的问题,因为它有时取决于您所谈论的 .NET 版本以及控件的状态.例如,PANEL,在 1 &1.1 渲染到 TABLE,而在以后的版本中它是一个 DIV.
This isn't a simple question, as it depends on which version of .NEt you're talking about and states of controls sometimes. For example, the PANEL, in 1 & 1.1 render to a TABLE while in later versions it's a DIV.
但总的来说(2/3),这里是:
But overall (for 2/3), here goes:
面板 - 分区
Panel - Div
面板 -- GroupingText=###"是字段集,图例
Panel -- GroupingText="###" is Fieldset, Legend
标签 - 跨度
按钮 - 输入、输入按钮
Button - Input, Type Button
链接按钮 - 带有 JS 回发脚本的 Href
Link Button - Href with JS Postback Script
超链接 - 标准 HREF
Hyperlink - Standard HREF
图像按钮 - 输入,输入图像
Image Button - Input, Type Image
文本框 -- 默认为输入,输入文本
Textbox -- Default is Input, Type Text
文本框 -- 模式 = 密码为输入,输入密码
Textbox -- Mode = Password is Input, type Password
Textbox -- Mode= Multiline is Textarea
Textbox -- Mode= Multiline is Textarea
DropDownList - 选择
DropDownList - Select
列表框 - 选择
RadioButton - 输入,带有 GroupName 的 Radio
RadioButton - Input, Radio with GroupName
复选框 - 输入,复选框
Checkbox - Input, Checkbox
Repeater/Listview --Complex.
Repeater/Listview --Complex.
Gridview - 表格
Gridview - Table
表格 - 表格
文件 - 输入,类型=文件
File - Input, Type=File
这就是基础.更深奥的控件(例如 LOGIN 控件)是一个表格,其中包含一堆赔率和结尾.
That's the basics. The more esoteric controls such as the LOGIN control is a table with a bunch of odds an ends within it.
这篇关于ASP.NET 控件到 HTML 标记等效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!