Details grid view refreshes the whole page unexpectedly
I have a grid view and details view. My details view is in the update panel and it should be displayed for edits of the gridview. I have a file Upload control inside detailsview, Now when I click the upload button the whole page gets refreshed.
What do I do and where do I do? I think it should be some problem with t开发者_如何学Pythonhe postback triggers.
use this..
http://geekswithblogs.net/ranganh/archive/2008/04/01/file-upload-in-updatepanel-asp.net-ajax.aspx
set
<Triggers><asp:PostBackTrigger ControlID="your fileupload control id" />
</Triggers>
in update panel
I think , you must post back when uploading a file, but try to do the following:
in the file uploader event : call the following method:
updatepanelName.Update();
If, it should not get refreshed then use the AutoPostBack= false
in Upload control.
精彩评论