D
deegee
Hi,
I'm new to C# and Visual Studio 2005 and very confused trying to do a
very simple thing (I think).
All I want to do is: when a page loads it runs a query on a table in a
database and displays the fields in various text boxes on the page.
I've added the SqlDataSource to the page ok; added the textbox ok; but
how do I bind the results of the query to the textbox?!?! Should be
so simple but I keep finding VS2003 examples
protected void Page_Load(object sender, EventArgs e)
{
SqlDataSource1.SelectCommand = "select name from person where
person_id = 1";
//TextBox1.Text = result of above command!!!!!!
}
I'd be very grateful for any advice/suggestions/dummies guide on how to
do this. While I'm here, can anyone recommend a good c#/asp.net book?
Thank you!!
deegee
I'm new to C# and Visual Studio 2005 and very confused trying to do a
very simple thing (I think).
All I want to do is: when a page loads it runs a query on a table in a
database and displays the fields in various text boxes on the page.
I've added the SqlDataSource to the page ok; added the textbox ok; but
how do I bind the results of the query to the textbox?!?! Should be
so simple but I keep finding VS2003 examples
protected void Page_Load(object sender, EventArgs e)
{
SqlDataSource1.SelectCommand = "select name from person where
person_id = 1";
//TextBox1.Text = result of above command!!!!!!
}
I'd be very grateful for any advice/suggestions/dummies guide on how to
do this. While I'm here, can anyone recommend a good c#/asp.net book?
Thank you!!
deegee