Solved

Refreshing page

Posted on 2013-06-27
4
263 Views
Last Modified: 2013-06-30
Hi,

I am uploading files and adding details to database using the following control and code. Both are working fine but after data to appear in the grid view I need to refresh the page (F5). How can I display the data soon after upload and insert completed? BindFiles sub retrieves the data from the table and bind to the gridview.

        <cc1:AsyncFileUpload runat="server" ID="AsyncFileUpload1"
            Width="400px" UploaderStyle="Modern" CompleteBackColor="White" UploadingBackColor="#CCFFFF"
            ThrobberID="imgLoader" OnUploadedComplete="FileUploadComplete" />



  protected void FileUploadComplete(object sender, EventArgs e)
   {
			cmd.ExecuteNonQuery ();
			bindFiles ();  

Open in new window


Thanks
0
Comment
Question by:ayha1999
  • 2
4 Comments
 
LVL 11

Expert Comment

by:mcnute
Comment Utility
isn't there missing something in your code? Please post your entire code.
0
 
LVL 7

Author Comment

by:ayha1999
Comment Utility
The page refreshed as expected when I used code on a button click event. But since I moved it to AjaxUpload event it is not refreshing anymore.
0
 
LVL 12

Accepted Solution

by:
Jitendra Patil earned 500 total points
Comment Utility
the code where you are inserting data in db after insertions of record just call the gridview
binding code again this will do the trick.

the will works for a less no of records, so be specific while firing sql queries for selecting records,as you are using asyn control so there may be possibilies of getting error from sql side.

hope this helps.
0
 
LVL 7

Author Closing Comment

by:ayha1999
Comment Utility
Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now