Hi All,
I am trying to pass a SqlParameter
to a SqlDataSource
.
The SqlDataSource
has a condition ...Where A.PERS_LNAME = @PERS_LNAME
Now coming to configuring SqlDataSource
, I click on 'Configure Data Source' and reach till the 'Define Parameters' step.
I selected 'Parameter Source' = Control, but I don't see the <asp:Table>'s ID's
at all!
Only the GridView
's id
is shown in the dropdown.
In short, I don't see the <asp:tablecell>
's id
at all
This is how my <asp:Table>
is defined.
<asp:Table runat="server">
<asp:TableRow runat="server">
<asp:TableCell runat="server">Lastname:</asp:TableCell><asp:TableCell runat="server"><asp:TextBox ID="sqlParameterLastname" runat="server"></asp:TextBox></asp:TableCell>
<asp:TableCell runat="server">Firstname:</asp:TableCell><asp:TableCell runat="server"><asp:TextBox ID="sqlParameterFirstname" runat="server"></asp:TextBox></asp:TableCell>
</asp:TableRow>
</asp:Table>
Additional Info:
The following two scenarios work, but the third one doesn't work. Please note that the difference between 2 & 3 is that I have introduced an extra column with a <td>LastName</td>
<asp:TextBox ID="sqlParameterLastname" runat="server">
<table><tr><td><asp:TextBox ID="sqlParameterLastname" runat="server"></asp:TextBox></td></tr></table>
<table><tr><td>LastName</td><td><asp:TextBox ID="sqlParameterLastname" runat="server"></asp:TextBox></td></tr></table>
Can you help me where I am going wrong? Or is such embedding of asp controls not permitted? Thanks!