<asp:GridViewID=”GridView1″runat=”server”DataSourceID=”SqlDataSource1″

AllowPaging=”True”AllowSorting=”True”AutoGenerateColumns

 

=”False”>

 

 

<Columns

 

>

 

 

<asp:BoundFieldDataField=”User_Name”HeaderText=”User_Name”

SortExpression=”User_Name”

 

/>

 

 

<asp:BoundFieldDataField=”Host_Name”HeaderText=”Host_Name”

SortExpression=”Host_Name”

 

/>

 

 

<asp:BoundFieldDataField=”OS_Version”HeaderText=”OS_Version”

SortExpression=”OS_Version”

 

/>

 

 

<asp:BoundFieldDataField=”Service_Pack”HeaderText=”Service_Pack”

SortExpression=”Service_Pack”

 

/>

 

 

<asp:BoundFieldDataField=”Logon_Server”HeaderText=”Logon_Server”

SortExpression=”Logon_Server”

 

/>

 

 

<asp:BoundFieldDataField=”IP_Address”HeaderText=”IP_Address”

SortExpression=”IP_Address”

 

/>

 

 

<asp:BoundFieldDataField=”Time_Stamp”HeaderText=”Time_Stamp”

SortExpression=”Time_Stamp”

 

/>

 

 

<asp:BoundFieldDataField=”Free_Space”HeaderText=”Free_Space”

SortExpression=”Free_Space”

 

/>

 

 

<asp:BoundFieldDataField=”Volumes”HeaderText=”Volumes”

SortExpression=”Volumes”

 

/>

 

 

<asp:BoundFieldDataField=”MAC_Address”HeaderText=”MAC_Address”

SortExpression=”MAC_Address”

 

/>

 

 

</Columns

 

>

 

 

</asp:GridView

 

>

 

 

<asp:SqlDataSourceID=”SqlDataSource1″runat=”server”

ConnectionString=”<%$ ConnectionStrings:bginfoConnectionString %>

SelectCommand

 

=”SELECT [User_Name], [Host_Name], [OS_Version], [Service_Pack], [Logon_Server], [IP_Address], [Time_Stamp], [Free_Space], [Volumes], [MAC_Address] FROM [BGInfoTable] WHERE (([Host_Name] LIKE ‘%’ + @Host_Name + ‘%’) AND ([Host_Name] LIKE ‘%’ + @Host_Name2 + ‘%’)) ORDER BY [Time_Stamp], [Host_Name]”>

 

 

<SelectParameters

 

>

 

 

<asp:ControlParameterControlID=”searchbox”Name=”Host_Name”

PropertyName=”Text”Type=”String”DefaultValue=”%”

 

/>

 

 

<asp:ControlParameterControlID=”searchbox”Name=”Host_Name2″

PropertyName=”Text”Type=”String”DefaultValue=”%”

 

/>

 

 

</SelectParameters

 

>

 

 

</asp:SqlDataSource

 

>

 

 

Advertisements