?
Solved

Refreshing page

Posted on 2013-06-27
4
Medium Priority
?
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 11

Expert Comment

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

Author Comment

by:ayha1999
ID: 39283633
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 13

Accepted Solution

by:
Jitendra Patil earned 2000 total points
ID: 39288068
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
ID: 39288387
Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
Suggested Courses

765 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