Sqldatasource onupdating method
Sqldatasource onupdating method - Online sex
The Bind("User Name") will get the username from the database and display it on the screen and it will also send the username back to the database when you update.Now, consider a situation where you don't want to display the username from the database but you want to display the current user in the txt User Name Text Box.
But, now the question is that how will you update the username or send the username to the database.I dont want to sound stupid but how do you create a protected string and where is that code placed as I keep getting errors.Is there any chance you could provide the full code and I will be really greatful. I have a very simple setup that should work fine per documentation.You cannot use Control Parameter since the name of the Text Box for each Grid View row is different.You can however add assign the parameter in the Sql Data Source Updating event.
This is exacly what I am trying to achieve and I am so close to a solution.
I am very new to and have tried what you suggested.
Sql Data Source allows you to Select/Insert/Update/Delete the data from the database without even writing a single line of code.
But sometimes you need to dynamically assign a parameter.
First let's take a look at the simple update which does not dynamically assign the parameters.
In the example below I am using a simple Grid View control and updating the User Name, First Name and Last Name.