Solved

Refreshing page

Posted on 2013-06-27
4
268 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 12

Accepted Solution

by:
jitendra patil earned 500 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

749 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