?? asp-datalist-format-item.aspx
字號:
<%@Page Language="C#"%>
<html>
<body>
<asp:datalist id="dlTest" runat="server"
forecolor="#000000"
backcolor="#ffffff"
cellpadding="3"
gridlines="none"
width="50%" >
<itemstyle font-name="tahoma,arial,sans-serif"
backcolor="#ffffff" />
<alternatingitemstyle font-name="tahoma,arial,sans-serif"
backcolor="#ffff00" />
<itemtemplate>
<%# DataBinder.Eval(Container.DataItem, "Key", "<font size='1'>{0}</font>") %>
<%# DataBinder.Eval(Container.DataItem, "Value", "<font size='1'>${0:f2}</font>") %>
</itemtemplate>
<alternatingitemtemplate>
<%# DataBinder.Eval(Container.DataItem, "Key", "<font size='4'>{0}</font>") %>
<%# DataBinder.Eval(Container.DataItem, "Value", "<font size='4'>${0:f2}</font>") %>
</alternatingitemtemplate>
</asp:datalist>
</body>
</html>
<script Language="C#" runat="server">
void Page_Load() {
// create a HashTable of values to bind to
Hashtable tabValues = new Hashtable(4);
tabValues.Add("Microsoft", 49.56);
tabValues.Add("Sun", 28.33);
tabValues.Add("IBM", 55);
tabValues.Add("Compaq", 20.74);
tabValues.Add("Oracle", 41.1);
// set the DataSource property of the control to the
// hashtable and bind it to display the values
dlTest.DataSource = tabValues;
dlTest.DataBind();
}
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -