I'm an old asp coder but am new to both asp.net and Visual Web Designer.
Before, when I needed just one value from a table, I used to write <%=a_name%> but what should I do now? All the tutorials I've been looking through have been geared towards the new (admittedly cool) features of the gridviews etc., so this basic feature has always been omitted).
Lets say I have a ... (it's an sql datasource, right?) with the following SELECT statement:
SELECT phone_no, email
WHERE userID = 582
and I want to insert the phone_no in one part of the page and the email address in another part of the page. I guess I shouldn't use a gridview or the like and I can't understand why there isn't a dedicated control in the "data" collection of the tool box. A neat way of achieveing this would be to be able to browse for the data in the properties pane of, say, a label. But, and to sum up:
1. What is the proper way of achieveing this, code-wise?
2. How do I do it in VWD (I suppose there is some kind of drag'n'drop available)?
I believe there MUST be some kind of drag'n'drop or so for attaching a chunk of data - say, a data row's email field - to a label, text field, regular html text, or whatever.
Please help me out (before I return to Asp ;-) ). If someone could just give me a few lines of step-by-step instructions like this:
"1. Drag a SqlDataSource to the Design View. Set its properites to the connection string and set its Sql statement as you'd like it.
2. Drag a ... to the Design View and set its properties to ... .
3. Drag a Label to the Design View and set its ... to ..."
I notice a lot of people are struggling with this issue but I haven't seen any "cook-book-ish" replies so far (possibly because Asp.Net 2.0 and VWD are so new). In other words, easy to follow step-by-step instructions would most certainly be appreciated by a lot of users. (And yes, I know there are many complex ways of doing this but I just need one standard, straight-forward solution.)
Many thanks in advance,