I am new to VB/ASP.net
I have a login form with user data in SQL server database.
I am trying to compare the password for the username the user entered on the form with the one stored in database.
In the button click event I am trying to use the following, but I get an error.
Dim strchkpw as string
strchkpw= SqlDataSource1.SelectCommand
How can I get to run the sql command that stchchkpw has and return the value
(If I use sqldatasource1.selectparameters(txtusername.txt), I get an error)
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BMI_TestConnectionString %>"
SelectCommand="SELECT [Password] fROM [Contacts_Users] WHERE ([Username] = @Username)">
<SelectParameters>
<asp:FormParameter FormField="txtUsername" Name="Username" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
I have a login form with user data in SQL server database.
I am trying to compare the password for the username the user entered on the form with the one stored in database.
In the button click event I am trying to use the following, but I get an error.
Dim strchkpw as string
strchkpw= SqlDataSource1.SelectCommand
How can I get to run the sql command that stchchkpw has and return the value
(If I use sqldatasource1.selectparameters(txtusername.txt), I get an error)
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:BMI_TestConnectionString %>"
SelectCommand="SELECT [Password] fROM [Contacts_Users] WHERE ([Username] = @Username)">
<SelectParameters>
<asp:FormParameter FormField="txtUsername" Name="Username" Type="String" />
</SelectParameters>
</asp:SqlDataSource>