I thought the rowupdating event was the place to do that, so I wrote the following method: A couple things to note: 1) the textbox and the label are inside an Item Template. Text "1111" 'set other update parameters Sql Data Source1. The textbox is visible when the gridview is in "edit mode", and the label is visible when the gridview is in "normal mode" 2) When I place a breakpoint in the rowupdating method, it looks like the values are changed as I would expect them to be. Update() End Sub Thanks, Qin, Thanks for the response. Row Updating Dim f File Attachment As File Upload = CType(Me. To save the file you need to use the File Upload control’s Save As method. Get All Bytes to get its image bytes and assign it to the Sql Data Source (Update Command). The following is an example of a Sql Data Source control where an Image parameter is added, and where the Select- and Update Command are specified (The Image parameter represents the filename that will be passed to the Update Commnad): " ID="Sql Data Source1" runat="server" Select Command="SELECT [Customer ID], [Name], [Image] FROM [Customers]" Update Command="UPDATE [Customers] SET [Name] = @Name, [Image] = @Image WHERE [Customer ID] = @original_Customer ID" The File Upload control, will not automatically save the uploaded file. I think you should put an File Uploder into the Grid View, and say that you should get the specific file through its text, and use File. Find Control("cb1_ML"), Check Box) Dim Col1_PH = CType(Gridview1. Find Control("cb1_PH"), Check Box) Dim Col1_APH = CType(Gridview1. If you only want to show the File Upload control when a row has entered edit mode, you can add the File Upload ot the Edit Item Template: As you can see in the code above, the Item Tempalte will display an Image control, where the Image Url attribute of the control is bound to a “Image” field (The “Image” in this case is the name of the data source’s column that will contain the path to the image that should be displayed).
event is raised when a row's Edit button is clicked, but before the Grid View control enters edit mode.
This article will give you an overview of how to use an ASP.
NET Grid View completely, and how to use Row Editing, Row Updating, Row Deleting, Row Command, Row Data Bound, Row Canceling Edit, and Pagination in a Data Grid.
event is raised when a row's Update button is clicked, but before the Grid View control updates the row.
This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, whenever this event occurs.