Link to home
Start Free TrialLog in
Avatar of Figle
Figle

asked on

How to use a asp.net button, on click to insert the values of text boxes into a MySql Database?

I am designing a web page in visual studio.net 2005 using C#, ajax, asp.net 2.0 and has a MySql database tied in that displays the information from the database in a gridview.

My question is how do i make a button that will allow me to take values entered into a series of text boxes and insert the values into the MySql database table employeestatus on button click. Thanks for ya time!
SOLUTION
Avatar of abel
abel
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Figle
Figle

ASKER

Thanks im trying out these solutions now, but im not using a datagrid thou im using a gridview, does it matter?
Most of the idea is the same, but there are a few subtle changes though. Nothing that will hold you back.
Avatar of Figle

ASKER

I decited to use interface of the gridview instead of creating new buttons, and i got the update working but, im not sure how to have the WHERE target individual records instead of the whole column. Here is my working update code.

UpdateCommand="UPDATE employeestatus SET `First Name` = ? WHERE (`Badge` = Badge)

It updates the whole First Name column because my WHERE is not correct, the badge field is the primary key field. How can i get it to target only the record that i edit?

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial