Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
how do you use code behind to query a database?
I have a user text box and a password text box on a page with a submit button. When a user enters their user name and password and hits submit, it should simply go and query a table called users for that individual. I can't figure out how to tell the SUBMIT button to do that. I guess I would have simply double clicked on the submit button in visual studio to get the code behind code but I don't know:
1. what the ID should be for the submit button so visual studio populates the generic code that I need.
2. What code I need to pull the columns user and password from the users table and where that code goes.
3. The result set will obviously have to wait . I plan on just returning the persons information--like displaying some other information about the user on a second page. They will not be logging into anything. I am just playing around with actually getting data from the database that I already have setup. Sorry if this posted in the wrong area...I'm guessing this is very newbie material
0 · ·