<%@Page Language="c#" debug="True" %>
<%@Import Namespace="System" %>
<%@Import Namespace="System.Data" %>
<%@Import Namespace="System.Data.SqlClient" %>
<%@Import Namespace="System.Web.UI" %>
<%@Import Namespace="System.Web.UI.WebControls" %>
<%@Import Namespace="System.ComponentModel" %>

<script Language="c#" runat="server">
void Page_Load()
{
// Setup time variable
time.Text = DateTime.Now.ToString();

// First we will set up variables to hold two strings
string strSQL = "SELECT ShortTitle AS [TITLE - Prerequisites],Author AS AUTHOR, Date AS DATE, ISBN FROM qBiblioPub WHERE [pre-req]=1;";
string strConnection = "server=99.999.999.9;";
strConnection += "database=keytap;uid=******;password=*******;";
DataSet objDataSet = new DataSet();
SqlConnection objConnection = new SqlConnection(strConnection);

// Create a new DataAdapter using the connection object and select statement
SqlDataAdapter objDataAdapter = new SqlDataAdapter(strSQL, objConnection);

// Fill the dataset with data from the DataAdapter object
objDataAdapter.Fill(objDataSet, "Employees");

// Create a DataView object for the Employees table in the DataSet
DataView objDataView = new DataView(objDataSet.Tables["Employees"]);

// Assign the DataView object to the DataGrid control
dgrEmployees.DataSource = objDataView;
dgrEmployees.DataBind(); // and bind [display] the data;



// ***** NOW: set up for 2nd DataGrid - NOTE ONLY "2's" added.
// STEERING DOCUMENTS: Second we will set up variables to hold two strings for steering documents
string strSQL2 = "SELECT ShortTitle AS [TITLE - Steering Documents],Author AS AUTHOR,Date AS DATE,ISBN FROM qBiblioPubSQLPrjCTL;";
string strConnection2 = "server=99.999.999.9;";
strConnection2 += "database=keytap;uid=******;password=******;";
DataSet objDataSet2 = new DataSet();
SqlConnection objConnection2 = new SqlConnection(strConnection2);

// Create a new DataAdapter using the connection object and select statement
SqlDataAdapter objDataAdapter2 = new SqlDataAdapter(strSQL2, objConnection2);

// Fill the dataset with data from the DataAdapter object
objDataAdapter2.Fill(objDataSet2, "Employees2");

// Create a DataView object for the Employees table in the DataSet
DataView objDataView2 = new DataView(objDataSet2.Tables["Employees2"]);

// Assign the DataView object to the DataGrid control
dgrEmployees2.DataSource = objDataView2;
dgrEmployees2.DataBind(); // and bind [display] the data;



// ***** NOW: set up for 3rd DataGrid - NOTE ONLY "2's" changed to "3's".
string strSQL3 = "SELECT ShortTitle AS [TITLE - Full List],Author AS AUTHOR,Date AS DATE,ISBN FROM qBiblio;";
// Later TEST if new connection not needed
string strConnection3 = "server=00.999.99.9;";
strConnection3 += "database=keytap;uid=******;password=******;";
DataSet objDataSet3 = new DataSet();
SqlConnection objConnection3 = new SqlConnection(strConnection3);

// Create a new DataAdapter using the connection object and select statement
SqlDataAdapter objDataAdapter3 = new SqlDataAdapter(strSQL3, objConnection3);

// Fill the dataset with data from the DataAdapter object
objDataAdapter3.Fill(objDataSet3, "Employees3");

// Create a DataView object for the Employees table in the DataSet
DataView objDataView3 = new DataView(objDataSet3.Tables["Employees3"]);

// Assign the DataView object to the DataGrid control
dgrEmployees3.DataSource = objDataView3;
dgrEmployees3.DataBind(); // and bind [display] the data;


}
</script>


<html>
<head>
<title> </title>
</head>
<body>
<p align="center"><br>
<font size="1"><a href="http://www.keytap.com/index.htm" target="_top">
<img border="0" src="http://www.keytap.com/images/keylogo.gif" width="198" height="87"></a><br>
| <a target="_top" href="http://keytap.com/index.htm">home</a> |
<a target="_top" href="http://keytap.com/porno/index.htm">adult</a> |
<a target="_top" href="http://64.27.125.252/">notes</a> |<font face="Georgia"> </font>
<a target="_top" href="http://99.999.999.9:9003/">web served home-style</a><font face="Georgia">
</font>|
<a target="_top" href="http://keytap.com/ref.htm">bibliography</a> |
<a target="_top" href="http://www.keytap.com/forms/frm_que.htm">contact</a> |</font></p>

<center>
<table border="1" cellpadding="33" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" width="764">
<tr>
<td>
<font face="Georgia" size="1">

<h2 align="left"><font face="Georgia" size="4">List of References Used in
Constructing this Page</font></br></h2>
<h4 align="center"><font size="1">Snippet of underlying code was edited from
sample available in:&nbsp; <i>&quot;Beginning ASP.NET with C#&quot;; 2003, p. 490</i></font></h4>
</font>

<!-- INCLUDE NAVBAR -->
<% Response.WriteFile ("includes/SQLBiblioNav.htm"); %>
<!-------------------->

</td>
</tr>
</table>

<!-- C# inline ASP.NET datagrid -->

<asp:datagrid id="dgrEmployees"
runat="server"
Font-Name="Verdana"
Font-Size="xxsmall"
Width="764"
BorderWidth="1"
BorderColor="Black"
CellPadding="5"
ToolTip="These are the books that guide the study.">
<HeaderStyle Font-Bold="True" BackColor="lightgray"/>
</asp:DataGrid>

<!-------------------------------->

<table border="1" cellpadding="33" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" id="AutoNumber1" height="25" width="764">
<tr>
<td>
</td>
</tr>
</table>



<!-- 2nd C# inline ASP.NET datagrid -->
<asp:datagrid id="dgrEmployees2"
runat="server"
Font-Name="Verdana"
Font-Size="xxsmall"
Width="764"
BorderWidth="1"
BorderColor="Black"
CellPadding="5"
ToolTip="These are books used in the study.">
<HeaderStyle Font-Bold="True" BackColor="lightgray"/>
</asp:DataGrid>
</center>
<!-------------------------------->

<center>
<table border="1" cellpadding="33" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" id="AutoNumber1" height="25" width="764">
<tr>
<td>
</td>
</tr>
</table>




<!-- 3rd C# inline ASP.NET datagrid -->
<asp:datagrid id="dgrEmployees3"
runat="server"
Font-Name="Verdana"
Font-Size="xxsmall"
Width="764"
BorderWidth="1"
BorderColor="Black"
CellPadding="5"
ToolTip="These are books used in the study.">
<HeaderStyle Font-Bold="True" BackColor="lightgray"/>
</asp:DataGrid>
</center>
<!-------------------------------->

<center>
<table border="1" cellpadding="33" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" width="764">
<tr>
<td>


<!-- INCLUDE NAVBAR -->
<% Response.WriteFile ("includes/SQLnote.htm"); %>
<!-------------------->

<font size="1" face="Georgia"><i>This page last updated (by your click):&nbsp
<asp:label id="time" runat="server"/></font><p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr>
</table>
</center>
</h3>
</body>
</html>