G
Guest
Hi,
I am new to VB2005, but have used VB6 for a few years.
I have a simple web form in an asp.net project consisting of a DropDownList
and a TextBox.
I have managed to set a datasource for the DropDownList so that it will
autopopulate with a list of data when the page loads.
However I want the TextBox to populate with data based on the item selected
in the DropDownList.
I can make a pretty simple SQL Query that will return the data I need,
here's a pseudo example of what I need:
TextBox1.Text = result of (SELECT comment from TableName WHERE ColumnName =
DropDownList.text)
What VB Code do I need on the SelectedIndexChanged event for the
DropDownList in order to populate the TextBox with the result of the simple
SQL Query ?
Best Regards,
Henrik
I am new to VB2005, but have used VB6 for a few years.
I have a simple web form in an asp.net project consisting of a DropDownList
and a TextBox.
I have managed to set a datasource for the DropDownList so that it will
autopopulate with a list of data when the page loads.
However I want the TextBox to populate with data based on the item selected
in the DropDownList.
I can make a pretty simple SQL Query that will return the data I need,
here's a pseudo example of what I need:
TextBox1.Text = result of (SELECT comment from TableName WHERE ColumnName =
DropDownList.text)
What VB Code do I need on the SelectedIndexChanged event for the
DropDownList in order to populate the TextBox with the result of the simple
SQL Query ?
Best Regards,
Henrik