Link to home
Start Free TrialLog in
Avatar of brian2k1
brian2k1

asked on

ASP.NET DataGrid Image does not Refresh after Edit Mode

Thanks to other EE users I was able to add image uploading to my datagrid. However now when it goes back after the edit (new image uploaded) it shows the original image and not the new one unless I hit f5 and refresh the browser.

How can I fix this?

I'm using the following in the PageLoad sub and it calls the database and loads the new info into the datagrid.

If Not IsPostBack Then
    BindDataGrid()
End If
Avatar of mantarae
mantarae

After the edit takes place (ie, in your edit_command function), you need to call BindDataGrid() again.   Do not put it in the Page_Load function, otherwise the grid would be rebound before your edit is saved.
Avatar of brian2k1

ASKER

No. It updates fine. It's the IMAGES being displayed that do not refresh. I guess my question is how can I force the browser to update the images or disable their cache for the page.
ASKER CERTIFIED SOLUTION
Avatar of mantarae
mantarae

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