M
Mark Thomson
In my .aspx file i have:
<form runat="server">
<asp:GridView ID="GridView1" DataSourceID="SqlDataSource1"
runat="server"/>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
SelectCommand="select authorname from authors where authorid = authorid"
ConnectionString="<%$ ConnectionStringsubs %>" />
</form>
I have this code to run a query on the database.
The trouble is I don't know how to embed an authorid which is in my textbox
into the query.
in my .aspx.cs file i have:
protected void getAuthor_Click(object sender, EventArgs e)
{
}
How can i change the query so that i embed the authorid that i have got from
my textbox ?
<form runat="server">
<asp:GridView ID="GridView1" DataSourceID="SqlDataSource1"
runat="server"/>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
SelectCommand="select authorname from authors where authorid = authorid"
ConnectionString="<%$ ConnectionStringsubs %>" />
</form>
I have this code to run a query on the database.
The trouble is I don't know how to embed an authorid which is in my textbox
into the query.
in my .aspx.cs file i have:
protected void getAuthor_Click(object sender, EventArgs e)
{
}
How can i change the query so that i embed the authorid that i have got from
my textbox ?