ความผิดพลาดคืออาจารย์ 2

tips เกี่ยวกับการใช้ DataList

Posted by: -xox- on: พฤศจิกายน 25, 2008

1. แสดงค่าในแต่ละ field แบบเจาะจง

ในหน้า xxx.aspx สามารถใส่แบบนี้ได้

<asp:DataList ID=”DataList1″ runat=”server” GridLines=”horizontal” BorderWidth=”0px”>
<ItemTemplate>
<div style=”border:0px;”>
ตำแหน่ง :<%#DataBinder.Eval(Container.DataItem, “positions”)%>
<br />
สาขา : <%#DataBinder.Eval(Container.DataItem, “branch”)%>
<br />
เขต : <%#DataBinder.Eval(Container.DataItem, “zone”)%>
</div>
</ItemTemplate>
<SelectedItemStyle BorderWidth=”0px” />
<ItemStyle BorderWidth=”0px” />
</asp:DataList>

ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out / เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out / เปลี่ยนแปลง )

Connecting to %s