I'm building a client database system for a travel company.
They want to be able to retrieve all of their customer emails with one click, and have it appear on a textbox on the page, where they can copy it off and paste it into Outlook.
Currently, the textbox is called emailList, and is invisible until the button called emailGet is clicked.
However, I have no idea how to make the text appear into the textbox from an SQL query.
My SQL query is: SELECT CEmail FROM Clients. That's pretty much it.
In pseudocode, what I'm trying to do is:
sqlQuery = "SELECT CEmail FROM Clients"
Execute select query and store results (in a variable? or maybe directly to the textbox?)
emailList.Text = Result of sqlQuery
Thank you! :)