How to stop autopostback after selecting multiple files

  •  09-03-2012, 4:25 AM

    How to stop autopostback after selecting multiple files

    Hi,

     

    I have below code,

    <CuteWebUI:Uploader runat="server" ID="Uploader1" InsertButtonID="TestButton"

    MultipleFilesUpload="true" OnFileValidating="Find_MultiDocs">

    <ValidateOption MaxSizeKB="10240" />

    </CuteWebUI:Uploader>

    <cc:SubmitButton ID="TestButton" runat="server" Text="Select Multiple Documents"/>

     

    This is for selcting multiple files and triggering an event 'OnFileValidating' and In the 'Find_MultiDocs' method i am reading all the selected document's name.

    By getting all the selected dodcument's name, one-by-one i am checking whether the document's name exists in db or not ; if the document exist in db, i need to display existing documents in dataGrid by populating it to Datasource.

     

    I am able to populate the datasource and get all the data to datatable to display it in grid.

    But after getting all the data, the control is moving to OnInit method where the dataGrid is getting refreshed.

    Since the dataGrid is refreshed, dataGrid data is not displayed in the page.

    I suspect this is because page is getting refreshed(autopostback) after 'OnFileValididating'. Please some one help me out to solve this.

    Thanks in advance.

     

    Regards,

    Chetan. 

View Complete Thread