- Jan 8, 2006
- 836
- 0
- 0
i am extremely new to this so go easy ...
i want to load in a bunch of server code inside a DIV tag. right now my example works but the result loads at the top of the page (because i have it running at Page_Load). what i would like is to load it inside a DIV.
my code that is located in a code behind file: (i have removed some things but what i have works)
so if i load that page it spits out the result at the top of the page. i would like the result spit out inside a DIV tag on page load. HELP
i want to load in a bunch of server code inside a DIV tag. right now my example works but the result loads at the top of the page (because i have it running at Page_Load). what i would like is to load it inside a DIV.
my code that is located in a code behind file: (i have removed some things but what i have works)
Code:
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con1;
SqlCommand cmdSelectEmployees;
SqlDataReader dataReaderEmployees;
con1 = new SqlConnection("the omitted connection string");
con1.Open();
cmdSelectEmployees = new SqlCommand("SELECT LastName,Lab FROM Employee WHERE JobType=\'Something\' ORDER BY LastName", con1);
dataReaderEmployees = cmdSelectEmployees.ExecuteReader();
while (dataReaderEmployees.Read())
{
Response.Write(dataReaderEmployees.GetValue(1) + "<br />");
}
dataReaderEmployees.Close();
}
so if i load that page it spits out the result at the top of the page. i would like the result spit out inside a DIV tag on page load. HELP
