the differences between DataGrid and DataList in HTML View

   1.datagrid
   The datagrid’s label of vs.net is
<asp:grid>
   <colums>
<asp:bouldcolumn datafield=”A1” headtext=”class”></asp:boundcolumn>
<asp:bouldcolumn datafield=”A2” headtext=”name”></asp:boundcolumn>
<asp:bouldcolumn datafield=”A3” headtext=”sex”></asp:boundcolumn>

   </colums>
</asp:grid>

2.datalist
<asp:datalist>
<item template>
<%#DataBinder.Eval(Container.DataItem,”Username”)%>
<asp:CheckBox ID="CK1" runat=Server Checked=FALSE />
<asp:TextBox ID="TextBox1"  Width=60 runat="server" Text=<%#"HRG"+DataBinder.Eval(Container.DataItem,"Planner") %> ></asp:TextBox>
</item template>
</asp:datalist>

posted on 2008-01-04 21:28  飞天舞者  阅读(234)  评论(0编辑  收藏  举报

导航

For more information about me, feel free email to me winston.he@hotmail.com