Get textbox value gridview rowupdating

21-Jul-2017 11:44

As you can see that two Bound Columns and two Template Columns.The Category ID and Category Name are the Bound columns which are bound to the "Category ID" and "Category Name" fields in the Categories table in Northwind Database.

User ID = @User ID) AND (Delete = 0)" Insert Command="INSERT INTO tbl User(First Name, Last Name, User Name, Password, Birthdate, Address, Apt, City, Province, Postal Code, Email, Phone Num, yn Admin User, yn Delete) VALUES (@First Name, @Last Name, @User Name, @Password, @Birthdate, @Address, @Apt, @City, @Province, @Postal Code, @Email, @Phone Num, @yn Admin User, 0)" Update Command="UPDATE tbl User SET First Name = @First Name, Last Name = @Last Name, Birthdate = @Birthdate, Address = @Address, Apt = @Apt, City = @City, Province = @Province, Postal Code = @Postal Code, Phone Num = @Phone Num, Email = @Email, yn Admin User = @yn Admin User WHERE (User ID = @User ID)"it's throwing an exception because it's trying to pass NULL as the province parameter...which indicates that ddl Province. I have a gridview that, when in edit mode, I use a dropdown to load all provinces, however, when I change the province and click update, my page crashes... I'm not sending the province parameter to the gridview's updateparameters properly...here's my code, someone please help.. Database Table Structure We are using an "EMPLOYEE" table so the "EMPLOYEE" table design is: Design of Grid View We design a Grid View with which we can perform update and delete operations.Here we can update Name, Emp_Code and Emp_Age fields depending on the Id field of the "EMPLOYEE" table.

User ID = @User ID) AND (Delete = 0)" Insert Command="INSERT INTO tbl User(First Name, Last Name, User Name, Password, Birthdate, Address, Apt, City, Province, Postal Code, Email, Phone Num, yn Admin User, yn Delete) VALUES (@First Name, @Last Name, @User Name, @Password, @Birthdate, @Address, @Apt, @City, @Province, @Postal Code, @Email, @Phone Num, @yn Admin User, 0)" Update Command="UPDATE tbl User SET First Name = @First Name, Last Name = @Last Name, Birthdate = @Birthdate, Address = @Address, Apt = @Apt, City = @City, Province = @Province, Postal Code = @Postal Code, Phone Num = @Phone Num, Email = @Email, yn Admin User = @yn Admin User WHERE (User ID = @User ID)"it's throwing an exception because it's trying to pass NULL as the province parameter...which indicates that ddl Province. I have a gridview that, when in edit mode, I use a dropdown to load all provinces, however, when I change the province and click update, my page crashes... I'm not sending the province parameter to the gridview's updateparameters properly...here's my code, someone please help.. Database Table Structure We are using an "EMPLOYEE" table so the "EMPLOYEE" table design is: Design of Grid View We design a Grid View with which we can perform update and delete operations.Here we can update Name, Emp_Code and Emp_Age fields depending on the Id field of the "EMPLOYEE" table.Now we access this connection string on the page so we can open a connection with the relation database. The first one accesses the connection string and the other is for the SQL connection.