Posted on 2006-07-19
Is it possible to display a recordset variable in ASP.Net as was in the old ASP.
Ok, in ASP this would display a variable that was generated by a query of a database: <% =RS("controlNum") %>
"RS" being the variable that contained the recordset and "controlNum" a column in the db
How can I display a record set variable in the same manner as the old ASP using the query below?
<asp:SqlDataSource ID="myDB" runat="server" ConnectionString="<%$ ConnectionStrings:myDB %>" SelectCommand="SELECT * FROM [books] WHERE ([bookID] = @bookID)">
<asp:QueryStringParameter DefaultValue="1" Name="bookID" QueryStringField="bookID" Type="Int32" />
Thanks for your help!