<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><asp:SqlDataSource ID="source1" runat="server" ConnectionString="server=.;database=Students;trusted_connection=true"
SelectCommand="select * from Student" SelectCommandType="Text" >asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" DataSourceID="source1" AlternatingRowStyle-BackColor="#c3c3c3"
AutoGenerateColumns="false" HeaderStyle-BackColor="#cccccc" AllowSorting="true" OnRowDataBound="CheckPass" Visible="false">
<Columns>
<asp:BoundField HeaderText="姓名" DataField="name" DataFormatString="[{0}]" />
<asp:BoundField HeaderText="编号" DataField="studentno" ItemStyle-BackColor="#cccccc" SortExpression="studentno" />
<asp:BoundField HeaderText="地址" DataField="addrass" />
<asp:BoundField HeaderText="语文" DataField="chinese" SortExpression="chinese" />
<asp:BoundField HeaderText="英语" DataField="english" SortExpression="english"/>
<asp:BoundField HeaderText="数学" DataField="mathematics" SortExpression="mathematics"/>
<asp:BoundField HeaderText="班级" DataField="class" />
Columns>
asp:GridView>