P
phil
Hi,
I want to put a recordset in a gridview but i don't know how to pass the
value of the variable in the 'where' statement. The value of the variable is
set in the code-behind. i added a tag <selectParameters> but i don't know
which elements are needed and how...
This is my aspx file:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\mydb.mdb"
ProviderName="System.Data.OleDb"
SelectCommand="SELECT [name], [city] where [name]= @na">
<SelectParameters>
<asp:ControlParameter
Name="??" PropertyName="???" Type="String" ControlID="??" />
</SelectParameters>
</asp:SqlDataSource>
The code-behind contains this:
Public na As String 'i defined it public to be able to pass it to
aspx file ??
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
na = "phil"
End Sub
Thanks for help
Phil
I want to put a recordset in a gridview but i don't know how to pass the
value of the variable in the 'where' statement. The value of the variable is
set in the code-behind. i added a tag <selectParameters> but i don't know
which elements are needed and how...
This is my aspx file:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\mydb.mdb"
ProviderName="System.Data.OleDb"
SelectCommand="SELECT [name], [city] where [name]= @na">
<SelectParameters>
<asp:ControlParameter
Name="??" PropertyName="???" Type="String" ControlID="??" />
</SelectParameters>
</asp:SqlDataSource>
The code-behind contains this:
Public na As String 'i defined it public to be able to pass it to
aspx file ??
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load
na = "phil"
End Sub
Thanks for help
Phil